Mimicking Redux features with React Hooks and Context API
In the React world, one of the first ideas that come to mind when thinking about state management is using the Redux library.
Redux provides a predictable state container to centralize the global store of your application. Besides, with features like store, reducers, actions and middlewares, and methods such as
bindActionsCreator, Redux allows to easily create and manage a complex application.
Since the stable release of React Hooks (16.8v), we can natively implement our state management using only React goodies without any hassle.
In this post, we are going to identify the main features of Redux and we will try to replace them, using React Hooks and Context API, to create an app with “Redux-like” state management.