DEV Community

Victoria
Victoria

Posted on

State Management in React

I am confused...
You may have heard about different tools to manipulate the state in React and a lot of arguing around the pros and cons of each, but here is the naked truth - all are good, it just depends on the task. I am here to help to pick the right tool for your project with a short comparison.

First of all, let's define the terms.

State management is about how an application handles the data needs of its components, with regards to loading, storing, and sharing this data.

Your state management tools and techniques depend on:

  1. The size and complexity of your application
  2. How many components need to share data
  3. The unique strength and weaknesses of each

Diagram

You can take a look at different approaches here : Link to github

Feel free to share your thoughts and opinion about this topic :)

Live long and prosper!
Happy coding!

Oldest comments (4)

Collapse
 
brense profile image
Rense Bakker

Jotai!

Collapse
 
hugaidas profile image
Victoria

If you mean the state - management, it is pretty much like Recoil, which can be scalable too. Moreover, I would say in most the scenarios such instruments like Redux are a bit overkill Recoil or Jotai can cover the need very well

Collapse
 
brense profile image
Rense Bakker

I like jotai very much hehe it works great with react suspense too. I hope it will take a bigger market share as redux becomes less popular and tries to move people to redux toolkit.

Thread Thread
 
hugaidas profile image
Victoria

Probably so, most of the time Redux is unnecessary. Jotai looks cool, gonna see how it will go.