3 ms·
Context is a useful tool, but its only purpose is to make value accessible to deeply nested components. It's not even a state management tool - you have to mana
by acemarke 7y ago
Context is a useful tool, but its only purpose is to make value accessible to deeply nested components. It's not even a state management tool - you have to manage whatever state you want to put into that context, by yourself.
The useState and useReducer hooks start to resemble Redux a bit more when used together with context, but they definitely do not replace Redux.
For more details, see these posts :
- https://daveceddia.com/context-api-vs-redux/ https://daveceddia.com/context-api-vs-redux/
- https://www.simplethread.com/cant-replace-redux-with-hooks/ https://www.simplethread.com/cant-replace-redux-with-hooks/
- https://staleclosures.dev/from-redux-to-hooks-case-study/ https://staleclosures.dev/from-redux-to-hooks-case-study/
- https://medium.com/javascript-scene/do-react-hooks-replace-redux-210bab340672 https://medium.com/javascript-scene/do-react-hooks-replace-r...
- https://dev.to/chrisachard/can-you-replace-redux-with-react-hooks-20gm https://dev.to/chrisachard/can-you-replace-redux-with-react-...