3 ms·
Can't you use pure components as long as you make sure that all your callbacks are called with new objects, e.g. using the JavaScript spread notation? I think
by baddox 9y ago
Can't you use pure components as long as you make sure that all your callbacks are called with new objects, e.g. using the JavaScript spread notation?
I think the bigger reason that a global state management system becomes necessary is when the shape of your component tree doesn't closely match the shape of your state tree, because that means state (and callbacks) need to be passed down through components that don't care at all about that state simply because one of their distant descendant components does care about it.