In my previous post, “Starting a New App With Redux? Consider Context API First”, I wrote about the Context API as a viable alternative to Redux. In this post, I want to show how a React application using Redux looks when using the Context API.
I’m assuming that my previous article intrigued you enough that you’re considering migrating away from Redux. You have to ask yourself: Is migration worth it? The approach based on the Context API might be simpler, but that’s not enough of an argument on its own to rewrite perfectly functional code.
I can’t tell you if your situation merits the change or not. You have to consider your circumstances and decide based on that. Here are some helpful questions:
#redux