DEV Community

Cover image for What's your go to state management library these days?
Nick Taylor
Nick Taylor Subscriber

Posted on

What's your go to state management library these days?

We use Preact at Forem, the software that powers dev.to, but we do not use a state management library, just good old component state.

The last state management library I used was Redux back in Fall of 2018. If you require a state management library for your project, I'm curious which one do you use? Zustand, Redux, Recoil etc. or is it something more like React Query these days?

Also, what do you like/dislike about the state management library you use?

Go!

Photo by Alfons Morales on Unsplash

Latest comments (26)

Collapse
 
mrdulin profile image
official_dulin

Redux as always. RTK

Collapse
 
halbano profile image
halbano

I have used Redux for a while, and I am still using it in complex applications.
I am starting giving a change to recoil, and first experience is going so far. I really like the hooks approach to access and modify the global state.

Collapse
 
knitex profile image
Kumar Nitesh

Zustand is the go to state management library for me these days. No need to wrap your component under a Provider.

Collapse
 
alan2207 profile image
Alan Alickovic

Since there are multiple types of state you would consider choosing the best tool for the problem you are trying to solve.

Here is a brief summary of state types and when to choose which tool:

github.com/alan2207/bulletproof-re...

Collapse
 
touseefhaider profile image
Touseef Haider

I am using Redux from past 5 months

Collapse
 
othman2001 profile image
Othman

there is very nice tool i use to manage state , it is actually very easy tool
Overmind
check it is docs
overmindjs.org/quickstart

Collapse
 
dastasoft profile image
dastasoft

react-query almost always in my case. If the project is big enough and/or has big state changes Redux is a good choice especially because of the amazing debugging tools.

Collapse
 
jerevick83 profile image
jerevick83

Zustand all the way

Collapse
 
a03z profile image
Daniil

Effector is my absolute best now.

Collapse
 
pontakornth profile image
Pontakorn Paesaeng

I never got to the point where I really need a state management library. The valid use cases would be complex application such as e-commerce website, admin control panel, interactive e-learning system and more.

I don't really consider things like React Query or useSWR to be a complete state management library. They are more like library for simple fetching without headache.

Applications that are not complex would just need to handle input, processing, output and error. For example, a blog needs to fetch data from server then display content to users, a simple chat application would handling messages from other people and sending messages from the user. If the application is this simple, it would not need complex state management solution. At most, it may require some basic solution such as Context, useState, or useReducer.