- Learning about Redux vs Context API for state management. Fullstack React , TS & Node text book recommends using Redux for larger application. You can get away with using context for smaller less complicated app. The main pitfalls of Context is that it will cause children components to re-render even if it is wrapped in
React.memo
. This because when create a new context this is also a new React component which does not usememo
therefore changes to this parent causes a knock on effect to all children. There is no fix for this! 😢. Good Blog which expands upon this a bit more - https://leewarrick.com/blog/the-problem-with-context/