potentially refactor the navigation state setting object to use useReducer (as state has a different shape depending where it came from)?