DEV Community

Discussion on: useContext for better state management!

Collapse
 
vaibhavkhulbe profile image
Vaibhav Khulbe

React Hooks like useContext are definitely preferred over a somewhat complex Redux for state management.

I also liked this:

the useContext looks similar to useState. And later we will be using it same as useState!! Hence, whenever the setUserDetails function is called, the state change will be effective throughout the app, saving too much prop drilling.

Collapse
 
hey_yogini profile image
Yogini Bende

Thank you 🙌