What is my favorite React state management library

preview_player
Показать описание
Just use what ever you like, they are all basically the same.

My VSCode Extensions:
- theme: material community high contrast
- fonts: Menlo, Monaco, 'Courier New', monospace
- errors: Error Lens
- extra git help: Git Lens
- tailwind css intellisense
- indent rainbow
- material icon theme
- prettier & eslint
- ES7+ React Snippets

------------

Рекомендации по теме
Комментарии
Автор

There are lots of popular React State Management out there, but i love Zustand
Less boilerplate code
Provides clean code by eliminating the need to use Context Provides, thus resulting in shorter and more readable code.
State management is centralized and updated via simple defined actions. It is similar to Redux in this regard, but unlike Redux, where the developer has to create reducers, actions, and dispatch to handle state, Zustand makes it far easier.

Fatima-iekj
Автор

At work, we tried XState and it's super good especially using it to model real-world scenario such as product checkout. It helps us to prevent silly mistakes by hard restricting certain actions depending on the application state. It also has the best DX for asynchronous actions imo.

marcuslee
Автор

Honestly, for 99% of projects, I just stick to what's baked into React: lifting the state and/or composition. Although I feel both are pretty intuitive, I rarely hear other devs talked about composition as a legitimate option over state management libaries. I'd love to hear your take on it -- hasn't given me any problems yet!

ashundeyan
Автор

Great overview of the various options. Thanks.

tbcfrankee
Автор

Love all the informational videos you post about react! Great content! Do you have plans on making a video about MVC? I see you had some videos with projects using it, but it would be great to go in depth about the MVC pattern and how to implement it and its benefits

hamad
Автор

I recently discovered react-sweet-state by Atlassian! I love it it's a mix of redux and context and uses just the good parts. Also its hella simple

elementsmusicproduction
Автор

Good job babe! Way too hit 40k subscribers!!!

SeibertSwirl
Автор

When it comes to state management I recommend one of two libraries (for react applications) -- Zustand or Jotai. But like you said, a lot of it comes down to syntax preference. But from my testing working with larger applications with a lot of interactivity and various states -- Zustand is honestly top notch and very performant and doesn't require a provider. Jotai I find is good as well for simplistic state management. Like for an example sharing state between a toast and when that toast should show without prop drilling a boolean ( not sure if this makes sense ).

quelchx
Автор

I like the excalidraw touch, the videos are improving!

yaseru
Автор

Jotai = Joe-tie. Means state in Japanese.

I’m currently building a prototype Jotai implementation for one of my web app’s core functions that uses global application state. Hoping to move off of Context. We’d be able to delete hundreds of lines of mostly boilerplate code and still be able to do the same things if all goes well.

owenwexler
Автор

If you try Valtio, I think you'll find it's everything you're looking for. I've been using it for a while and it's just a pleasure to use. Made by the same guy as Jotai and Zustand, so it's well maintained and documented.

r_rho
Автор

Haters will be trolls. Forget about em. Keep up good work and thanks for great content.

jaygarricktheflash
Автор

Guys what was his preferences ? what did he value as the best state management library? Also, a bit surprised that he didn't mention Recoil

Tommy-and-Ray
Автор

Please can you make video on cache in react js

irfanmohammad
Автор

I prefer using the context argument that is provided by react-router instead of that bloated syntax provided by the default context.
I don't know if it's a bad practice or not though?

anasouardini
Автор

First minute in and I already agree with everything you said. I want to use Redux for my project and I get a bunch of comments saying “Why Redux!!??! Redux bad!!!! Omg use Zustand!!!” It’s almost as if people are so fixated on what’s trending instead of just making their own decision.

ansonthedev
Автор

I like to use SWR and for most of the projects its enough

jesuscc
Автор

This reminds me of Ember's "Controllers".

TimothyBushell
Автор

Can ya give Recoil a review? It also uses atoms. Pretty similar to others you reviewed here.

kimbapslayer
Автор

joe - t(roll tongue to sound like an R)ae

ps: You know how you pronounce the last T on "Toyota"? That's what I'm refering to "rolling your tongue to sound like an R" when explaining how to pronounce the T on "jotai" 🤣🤣🤣🤣

psx2: I zustand. But you are 100% right in my opinion... I feel like there should be a way for libraries like zustand to make mutability simple... you declare a variable... you mutate it, and
Ofc there's problems with mutability but it could be a opt in... With a pre compiler I don't know... But then the library wouldn't weight 1KB gzipped... Idk...

joaomendoncayt