The new Hooks API solves a lot of problems. But it does not solve the problem why we need Redux and Higher Order Components. This article explains why.

How to use the useReducer function

Consider a React app with independent container components: ‘Module A’, ‘Module B’, ‘Module C’ and so on. When I say independent, what I mean is Module A does not share state with Module B or Module C.…

Read More
Bye Redux

Redux is a global state manager. React Redux provides bindings for React apps. In this article, I will show how we can manage global state using reducer functions just like how Redux does.

Disadvantages of useReducer hook

useReducer hook has a few limitations. We cannot use the hook with the same reducer more than once. Because of the limitation, a React app using useReducer hook passes down props from the container components down to leaf level components.…

Read More