Lots of colleagues have been asking me variations of the same question:
“If we’re using hooks in our project, are we going to even need Redux?”
“Don’t React hooks make Redux obsolete? Can’t I just do all the same things Redux does with hooks?”
A quick Google search will show that people are asking these questions all over the internet.
The fast answer to “Do React hooks replace Redux?” is “not really.”
The more nuanced but polite answer is “Well, that really depends on the kind of project you’re working with.”
The answer that I’m inclined to tell people is…
If you search “Redux hooks” on Google, you won’t find a lot of resources about the cool new React-Redux hooks API. What you will find are bunch of articles about how to use React hooks as a replacement for Redux and other state management libraries.
But this was never the point of hooks. React hooks were made to allow developers to write functional components that can do all the things we once needed class components for, like using state or lifecycle methods. React hooks improve the developer experience by optimizing the organization, maintainability, and readability of React code. They allow…