4 ms·
Not sure I follow. Selectors don't need redux. I use them everywhere. https://github.com/reduxjs/reselect https://github.com/reduxjs/reselect > Just because y
by WalterSear 8y ago
Not sure I follow. Selectors don't need redux. I use them everywhere.
https://github.com/reduxjs/reselect https://github.com/reduxjs/reselect
> Just because you render a bunch of wrapper components (one for each HOC)?
Efficient rendering would involve >not< re-rendering the child on every prop render, but only when the relevant props have changed. Connect does a shallow comparison, so all the props need to be immutable for it to work.
You can use immutablejs to make your object props immutable, but this gets messy fast. I have found it easier to use selectors, and have changes land when an actual change happens, rather than checking for them or organizing your data to facilitate change detection (rather than organizing your data to make it easier to think about).