That's why you can replace Redux with Context API with ease
If you want to replace Redux with your own solution using context API (btw redux uses it too under the hood), you need to implement much more code than you did in this article. Otherwise your solution would be extremely slow at big projects.
That's also what I fear, having read about that in other articles - you can get unnecessary re-renders and so on unless you implement further optimizations - by then you'd start wondering if you threw out the baby with the bath water.
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.
I have never said it's simpler than Redux, but
1. Use state variable
can be an easier and better way for a small app to manage data globally.This is a big merit for me to use Context API instead of Redux.
That's why you can replace Redux with Context API with ease.
Thanks.
If you want to replace Redux with your own solution using context API (btw redux uses it too under the hood), you need to implement much more code than you did in this article. Otherwise your solution would be extremely slow at big projects.
That's also what I fear, having read about that in other articles - you can get unnecessary re-renders and so on unless you implement further optimizations - by then you'd start wondering if you threw out the baby with the bath water.