Neha / AMA

AMA - Ask me anything
10 stars 2 forks source link

React Hooks vs Redux #5

Closed b2banna closed 3 years ago

b2banna commented 5 years ago

Do I need Redux if I am already using React Hooks?

Neha commented 5 years ago

Yes, you need redux if you already using React hooks. However, you can do a comparison between Redux vs context API.

React hooks are the APIs to replace the lifecycle of components - componentDidMount, componentDidUpdate, etc. as well as to remove the class-based components.

Whereas, Redux is your state management library. If your application has the data which is going to access and share across application then you need Redux.

I would recommend you to read about context API

Thank you.