4

React Context + useReducer - Still to this day my favorite way of managing global state in React, no extra dependencies, no learning curve, it's all there built-in

you are viewing a single comment's thread
view the rest of the comments
[-] ElkanNixed@programming.dev 1 points 1 year ago

It really depends on what kind of state you're storing. For UI or other client stuff usually a context provider is enough. For server data/state I started using React Query a lot more. It syncs server data across components that use the same cache key, which is really powerful.

this post was submitted on 26 Jun 2023
4 points (100.0% liked)

React

907 readers
1 users here now

A community for discussing anything related to the React UI framework and it's ecosystem.

https://react.dev/

Wormhole

!pico8@programming.dev

Icon base by Skoll under CC BY 3.0 with modifications to add a gradient

founded 1 year ago
MODERATORS