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.
4
You don't need external libraries for global state management in React
(prophet-bestman.hashnode.dev)
Just curious - have you applied this in big React applications?
The reason I'm asking is because all context consumers get re-rendered immediately upon context value update. It might be ok for small apps but bigger apps can suffer.
Small to medium this can definitely work, large scale ( ex. Airbnb ) still works better with redux but i still see people misusing redux in smaller apps where you don't really need it
It's not just redux people really like to overengineer stuff nowadays
this post was submitted on 26 Jun 2023
4 points (100.0% liked)
React
1104 readers
1 users here now
A community for discussing anything related to the React UI framework and it's ecosystem.
Wormhole
Icon base by Skoll under CC BY 3.0 with modifications to add a gradient
founded 2 years ago
MODERATORS