Ad

State Management In React

Which technique is better for state management in react app? Actually I want to create a big app where I've to manage my state which technique is optimal for state management context, Redux or react custom hook?

Ad

Answer

I am personally more inclined towards Redux. But if you are a beginner trying to learn Redux you might have some hard time until you understand it. Once you get it you will also like it. Rather than building your own custom hook, It's better to use Redux as if anything goes wrong/you are struck with something, you have community to support and You can also dispatch async calls using some middleware libs like redux-thunk, etc. You can use Redux with forms as well. I guess if you end building your custom hooks you might end up wasting time, taking care of all these.

Ad
source: stackoverflow.com
Ad