I am moving a part of my app's state from the store to the URL.
I am currently using redux to manage my app's state along with reselect to create selectors. The selectors compute derived values from the state in the redux store (in principal, this is their only input).
Now part of the state will be contained within the URL instead, so I'm not sure how to go about reading it.
I have looked at react-router-redux, which at first glance may appear to be the solution (indeed, I can get to the value I want using state.routing.locationBeforeTransitions.query
) but this doesn't seem to be the right way to do it, given that in their docs it says:
You should not read the location state directly from the Redux store.
Is there another way that I can access my location state, or should I just ignore this warning and use it in my selector?
this.props.params.someparam
to action 3) usingredux-router
wich keeps your router state inside store. – Wellappointed