Oct 15, 2022
There is one very significant difference between your solution and Redux implementation though. Redux uses the stable identity of the store preventing re-rendering of the provider (and all the child components in the sub-tree below), and only triggering updates to specific subscribers. While in your case every new state produced by reducer will re-render your whole app, regardless of subscriptions to the context. Hope you realise this