Description
In my previous post I was writing about using Redux with React for the state management. This blog po...
Summary
- In my previous post I was writing about using Redux with React for the state management.
- But when application become larger, certain types of props (e.g.
- locale preference, UI theme) that are required by many components within an application, should be passed down from top to bottom through the components which doesn't even need them.
- The value argument passed to the function will be equal to the value prop of the closest Provider for this Context.
- Thank you for pointing out that JSX nesting can be solved with Redux, it's very useful :) If you use redux only to avoid a lot of Providers then I don't see the point, I mean I have lots of providers and for me Context makes my codebase cleaner and Redux makes my whole project look like a mess.