Open Jbarget opened 6 years ago
We are definitely still learning about best way to use react router but can you specify where we are handling location changes ourselves? I thought we generally were using React Router...
All navigation is through the Link React Router tag, so still not sure what you meant by this comment?
gotcha,
so you're keeping a hold of some location state here: https://github.com/fac-12/FAC-Events-Search/blob/master/client/src/reducers/locationReducer.js
and using it here: https://github.com/fac-12/FAC-Events-Search/blob/b79bdef449a049baab266458205730200913a112/client/src/components/Header/Header.js#L18
react-router-redux
handles that for you so you wont have to. (see the links in the comment above) and your location is available via this.props.router.location
along with a bunch of other stuff
Instead of handling location changes yourselves the standard is to use https://github.com/reactjs/react-router-redux
https://github.com/reactjs/react-router-redux#tutorial
it gives you access to a bunch of things on
this.props.router
when you wrap your component with