DEV Community

Discussion on: React Best Practices

Collapse
 
jwhenry3 profile image
Justin Henry • Edited

I'd advocate for a provider-less state tool like zustand (given the state is global)
github.com/pmndrs/zustand
Though, I can see the benefit of the provider pattern if you want multiple scoped states...

React query is great, and keep in mind there is also SWR
swr.vercel.app/

EDIT: After looking at unstated-next, I heavily support its usage in cases where you want multiple instances of a state (maybe you have separate thread management for a messaging app, and you want those states isolated).
I push for zustand for global state and unstated-next for localized state.