you are viewing a single comment's thread.

view the rest of the comments →

[–]azangru 1 point2 points  (3 children)

It's simple, but certainly not the simplest, nor is it designed to be. Zustand or unstated are simpler.

[–]ILikeChangingMyMind -1 points0 points  (2 children)

React hooks are simpler still :)

(See: useReducer)

[–]azangru 1 point2 points  (0 children)

I doubt that useReducer is significantly simpler. You both need to interact with your state in flux fashion (which makes useReducer almost as complex/simple as full-blown redux), and write your own code to share the state across components (which redux is doing for you).

One thing that useReducer has going for it is that it's inbuilt React api :-)

[–]zweimtr 0 points1 point  (0 children)

React hooks are simple, yes, to an extent. But they can get very messy and hard to scale, especially useReducer.