I don't get why most projects need Redux when React has the context API already. Most people just need a place to store data shared across different components, and plain contexts do that easily.
Because Redux and Context are different tools that solve different problems, with some overlap.
Context is a Dependency Injection tool for a single value. Note that it doesn't "manage" or "store" anything - it's just a tube that you can pass something through. Any actual "storage" is normally done with React's own `useState/useReducer` hooks, which actually _do_ store and update values.
Redux, meanwhile, is a tool for predictable state management outside React. Very different kind of tool, for a different purpose.
They can, but for any reasonable sized application, you're basically recreating bare redux. If someone is good with both, it can architect and choses the correct one based on the needs of your software. But if you find that your global state needs are not small, you just chose redux - add a library like rematch on top to reduce boilerplate - so it's straightforward for your junior.
Context is a Dependency Injection tool for a single value. Note that it doesn't "manage" or "store" anything - it's just a tube that you can pass something through. Any actual "storage" is normally done with React's own `useState/useReducer` hooks, which actually _do_ store and update values.
Redux, meanwhile, is a tool for predictable state management outside React. Very different kind of tool, for a different purpose.
More details:
https://blog.isquaredsoftware.com/2021/01/context-redux-diff...