2 ms·
I get what you're saying but for large react applications using Redux helps to dramatically reduce state complexity and increase maintainability. Having one fu
by qudat 9y ago
I get what you're saying but for large react applications using Redux helps to dramatically reduce state complexity and increase maintainability.
Having one function 5 levels deep that receives its props from a top level function means everytime you add a prop you have to modify 5 function signatures to get that new data. That quickly becomes unsustainable when you have 10+ layers.
What happens when you want to modify the prop that is set in the parent? You have to pass through a callback function that will modify that parent props and then trigger a re-render.
Very quickly you end up with problems that flux/redux/mobx try to solve.