I lost so many days of my life profiling and debugging to figure out why hundreds of components were re-rendering when a tiny thing changed somewhere completely unrelated
I lost so many days of my life profiling and debugging to figure out why hundreds of components were re-rendering when a tiny thing changed somewhere completely unrelated
You create a selector. You use the selector in a React component.
The component re-renders when the selector outputs a different value, with the usual reference equality caveat.
Does it get any simpler than that?
However, yes, I have seen most developers use Redux incompetently.
They would use actions like "setOrder" instead of "itemAdded", defeating the purpose of a state machine from the start.
Could you explain how this comes from React Native and/or redux?
I have used Angular with redux (ngrx) and redux made it quite obvious what changed what and why