-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
Document performance implications of ownProps and a workaround #1603
Comments
Example of this in practice: mweststrate/redux-todomvc@e5d25f0 |
In fact a lot of thinking in mweststrate/redux-todomvc#1 is non-obvious to beginners and even advanced users. We should have an optimization guide that explains how to find the optimization sweet spots and use them. |
Yeah. That and a "Structuring Reducers" recipe would be great additions to the docs. I'm kinda busy at the moment, but might be able to help out at some point. As a side note, I'm rather amused to see that you've adopted strictly passing IDs to children as a viable option for some use cases, given a couple of your earlier comments against it. :) Obviously reasons to do both, depending on the situation. |
It really depends on whether I’m trying to keep components more reusable or optimize the hell out of their updates. |
Great! thanks @gaearon |
Let's roll this up into #1783. It should definitely be covered there! |
Relying on
ownProps
inmapStateToProps
disables some optimizations in React Redux.We should mention this in the docs of both projects, and also include this neat tip on how
ownProps
can be avoided for many cases.Contributions are welcome!
The text was updated successfully, but these errors were encountered: