DEV Community

Discussion on: Senior front end dev here, ask me anything!

Collapse
 
1chris_alex profile image
Christian Alexsander

Hi Bob,

What do you think about all of these libs for react state management and what do you prefer? If we can make our own state management with Context APi, when and why shoud we use others libreries?

Collapse
 
kendalmintcode profile image
Rob Kendal {{☕}}

Hey Christian,

I've used the React Redux Toolkit extensively and it's amazing. It takes a lot of the hassle and some of the complexity of redux out. But you're correct, if I was starting a new project, I'd use the inbuilt React tools such as the useReducer Hook and the Context API like you said.

This does have drawbacks, however, such as unnecessary re-renders. You can mitigate this using a small helper library like React Tracked.