react-router-redux icon indicating copy to clipboard operation
react-router-redux copied to clipboard

Can't use with reselect

Open yanivtal opened this issue 11 years ago • 2 comments

We're trying to clean up our state management with reselect. Selectors act on redux state but some state lives in the URL so we need a way to sync react router state with redux so we can use router params in our selectors.

The problem with this implementation is we can't grab params or queries from state. There's no access to this.props from redux selectors. Any thoughts on how to fix that or will that never be possible with this library?

yanivtal avatar Nov 13 '15 19:11 yanivtal

It is possible to access props from Reselect selectors, connect provides props as the second argument to a selector.

https://github.com/rackt/reselect#accessing-react-props-in-selectors

ellbee avatar Nov 13 '15 21:11 ellbee

Gah. I stand corrected. Good implementation choice then. Thanks!

yanivtal avatar Nov 13 '15 21:11 yanivtal