Closed caseycesari closed 5 years ago
Feel free to reject this suggestion, but:
This app might be a good occasion for trying out React Router 4 by storing a lot of the navigation state in the router rather than in Redux. The idea would be that tapping a marker or tapping to open a popup activates a Link
tag, which then pushes a path like /delawarewatergap
or whatever and then the components match on the paths to render the proper thing. For the details popup, the routes could have suffixes like /delawarewatergap/details
. Dismissing something would just be like a browser back button.
Users -- and developers -- could then navigate to each page directly without having to go through the whole Redux flow to get there, and the Redux store and React component states would be smaller because they wouldn't need to store navigation state. This conceivably would make development and testing easier, since developers wouldn't have to click through to get to the details page.
This has a general overview of how RR4 works in case we wanted to try it here:
https://reacttraining.com/react-router/web/guides/philosophy
Thanks for the suggestion. That makes sense to me. Looks like CRA doesn't come with a router by default: https://facebook.github.io/create-react-app/docs/adding-a-router.
Depends on #37