Only yesterday, I finally gave in and replaced contexts with redux store.
To easy the pain, I used easy-peasy, which wraps Redux underneath the hood.
In my case, the migration was snappy as I was following Kent C. Dodd's Context Pattern mentioned in How to use React Context effectively, which exposes state & actions/dispatch separately via hooks, which is what Easy-Peasy does.
The upside was that, I was forced to "group" related states and actions together.
The reason my context approach was getting out of hand was, not because of any issues Context API (well, it does trigger re-render when it's updated everywhere) but because I was dumping all possible states without organizing them.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Only yesterday, I finally gave in and replaced contexts with redux store.
To easy the pain, I used easy-peasy, which wraps Redux underneath the hood.
In my case, the migration was snappy as I was following Kent C. Dodd's Context Pattern mentioned in How to use React Context effectively, which exposes state & actions/dispatch separately via hooks, which is what Easy-Peasy does.
The upside was that, I was forced to "group" related states and actions together.
The reason my context approach was getting out of hand was, not because of any issues Context API (well, it does trigger re-render when it's updated everywhere) but because I was dumping all possible states without organizing them.