-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Description
Redux docs state:
[We] wrap the components we want to connect to Redux with the connect() function from react-redux. Try to only do this for a top-level component, or route handlers. While technically you can connect() any component in your app to Redux store, avoid doing this too deeply, because it will make the data flow harder to trace.
https://rackt.github.io/redux/docs/basics/UsageWithReact.html
But, in a seeming contradiction, react-redux README states:
Don’t do this! It kills any performance optimisations because TodoApp will rerender after every action.
It’s better to have more granular connect() on several components in your view hierarchy.
I'm not sure whose advice to follow!
Metadata
Metadata
Assignees
Labels
No labels