-
Notifications
You must be signed in to change notification settings - Fork 675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't pass props in selectors #20
Comments
I'm not sure that the new react-redux api for the connect decorator is going to support this. Check out this PR |
Huh. That would be unfortunate... Maybe @gaearon can clarify? |
Seems that there will be an additional argument for |
Confirmed as gone in the release notes for react-redux v.0.5.0 |
It looks like this added back in react-redux. Can we get it back in this package? |
Yep, I guess we should look into this now |
Any time frame on this? Attempted to jump in on a fork, but didn't know if changes were coming soon for a 1.0. |
Funnily enough, I was just looking at it. Did you have a plan? I'm wondering how the dumb default memoize and its reference equality is going to work with the props. I don't recall how the props are handled inside react. I guess if the prop object is mutative and has a stable reference for the lifetime of the component or it is recreated entirely on each render then we might have problems? I think that the API might change slightly in the next version, possibly allowing the user to specify a memoization function in createSelectorCreator and allowing variadic depencies. I just started exploring this in my fork here if you'd like to have a look. |
Props object is new every time. It's considered immutable. |
Okay, I just finally started using reselect in a project and ran into this one. So basically we want to parameterize the select expression with an additional object that should be passed down the select chain, right? And we should be able to express when we consider this object unchanged, so that we can make use of caching. |
Take a look at #35. We've had a bit of a discussion about this there |
Address in the 1.0.0 release |
react-redux
supports passing props to select. Currently reselect only passes state. Is it possible to add props to selector functions?The text was updated successfully, but these errors were encountered: