5 ms·
That's actually covered directly in the linked tutorial page [0], as well as in our Redux FAQ section [1] Note that one of the weaknesses of the React context
by acemarke 6y ago
That's actually covered directly in the linked tutorial page [0], as well as in our Redux FAQ section [1]
Note that one of the weaknesses of the React context API is that it currently has significant limitations in how components using it re-render, because you can't bail out of re-renders caused by context or only selectively depend on certain pieces of a context value. In contrast, React-Redux lets you select specific pieces of data from the Redux store, and your components only re-render when the data they need changes. For more details, see my extensive post "A (Mostly) Complete Guide to React Rendering Behavior" [2].
My post "Redux - Not Dead Yet!" [3] also addresses some of the differences in use cases for Redux and Context, and how they're very different tools that solve different problems.
[0] https://redux.js.org/tutorials/essentials/part-1-overview-concepts#when-should-i-use-redux https://redux.js.org/tutorials/essentials/part-1-overview-co...
[1] https://redux.js.org/faq/general#when-should-i-use-redux https://redux.js.org/faq/general#when-should-i-use-redux
[2] https://blog.isquaredsoftware.com/2020/05/blogged-answers-a-mostly-complete-guide-to-react-rendering-behavior/ https://blog.isquaredsoftware.com/2020/05/blogged-answers-a-...
[3] https://blog.isquaredsoftware.com/2018/03/redux-not-dead-yet/ https://blog.isquaredsoftware.com/2018/03/redux-not-dead-yet...
- avtar 6y agoI'm unable to make a PR at the moment but the first linked page https://redux.js.org/tutorials/essentials/part-1-overview-concepts#when-should-i-use-redux https://redux.js.org/tutorials/essentials/part-1-overview-co... has a broken link https://redux.js.org/tutorials/faq/General.md#when-should-i-use-redux https://redux.js.org/tutorials/faq/General.md#when-should-i-... I'm assuming the correct link was supposed to be https://redux.js.org/faq/general#when-should-i-use-redux https://redux.js.org/faq/general#when-should-i-use-redux
- acemarke 6y agoThanks, I'd missed a relative path for that link. Just pushed a fix.