DEV Community

Victoria
Victoria

Posted on

5

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!

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more

Top 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.

The Most Contextual AI Development Assistant

Pieces.app image

Our centralized storage agent works on-device, unifying various developer tools to proactively capture and enrich useful materials, streamline collaboration, and solve complex problems through a contextual understanding of your unique workflow.

👥 Ideal for solo developers, teams, and cross-company projects

Learn more