DEV Community

Discussion on: Top React libraries you need to know in 2021

Collapse
 
andreybarkov profile image
Andrey Barkov

I haven't been doing React for a while, so I just wonder does it still make sense to use Redux or MobX in 2021?
I heard opinions that with React Hooks you don't need state management frameworks like those mentioned.

Collapse
 
zhnedyalkow profile image
Zhitomir Oreshenski

Redux + Hooks is still relevant in 2020

Collapse
 
zhnedyalkow profile image
Zhitomir Oreshenski

And 2021...

Collapse
 
ridoansaleh profile image
Ridoan

I think Redux has a better DevTools compared to Hooks in React

Because we can track all the changes history

Collapse
 
hume profile image
Horacio Rivero • Edited

Try create and maintain an application of the size of facebook web for long time with context state and then come back here and rethink your comment hehe.
Redux is library based on state management architecture called Flow, all you team must respect strict design patterns.

If you want to replicate the behavior of redux with hooks, you must create a logical layer on top of the hooks and context API.

The state control in Redux is extremely strict and easy to debug and trace, you can only create actions and reducers that are pure functions, only in the middlewares flow can exist side effects.

dispatch-> action -> reduce-> return current state or new state

The downside to redux is that it is very verbose and this sucks, but currently does not exist another better alternative for large scale applications.

You can use redux-toolkit to create inmutable states and to make all things whit Redux more simple.
Redux-toolkit

Collapse
 
devdufutur profile image
Rudy Nappée • Edited

Flux, not Flow ;)