Using Hooks to Replace Redux

Using Hooks to Replace Redux

6 years ago
Anonymous $9jpehmcKty

https://medium.com/better-programming/using-hooks-to-replace-redux-392f98ca61b7

As a beginner React developer coming from Vue, I found myself struggling with Redux and all the boilerplate needed to make simple state management the right way: action types, action builders, the proper actions, and reducers. If you want to connect it to React the easy way you have to install another package — react-redux — and learn how to use it. After that, if you want to use async actions, you have to write your own redux middleware or learn how to use another package — redux-thunk…

But then React comes along with hooks! Hooks are magical little things that let you use class-based components features, like lifecycle hooks and state management in functional components, with much greater ease.