4 ms·
It's important to note that there _are_ differences in how `useContext+useReducer` behave vs how (React-)Redux works, especially around when and how components
by acemarke 6y ago
It's important to note that there _are_ differences in how `useContext+useReducer` behave vs how (React-)Redux works, especially around when and how components will re-render:
- https://blog.isquaredsoftware.com/2021/01/context-redux-differences/ https://blog.isquaredsoftware.com/2021/01/context-redux-diff...
- 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-...
- jeswin 6y agoAny large codebase should be using multiple contexts - which not only alleviates some of the performance pains but also helps in keeping the code structured (compared to one big state object that Redux recommends - unless that's changed). Now if we're talking very high frequency updates, you'd probably keep the state in the component. That'd be faster then either approach - and such components are likely few in number.