3 ms·
With the release of React Hooks and the advent of GraphQL + its client-side libraries, state management [0] became a blessing IMO. Whenever it's possible I woul
by rwieruch 7y ago
With the release of React Hooks and the advent of GraphQL + its client-side libraries, state management [0] became a blessing IMO. Whenever it's possible I would opt-in using GraphQL for client-server communication. Then popular libraries like Apollo Client help you with all the state management for remote data and its caching. After this, all the remaining state management can be done with React Hooks (useState, useReducer, useContext)[1]. Only if this gets out of hands, opt-in Redux/MobX/...
- [0] https://www.robinwieruch.de/react-state https://www.robinwieruch.de/react-state
- [1] https://www.robinwieruch.de/react-state-usereducer-usestate-usecontext https://www.robinwieruch.de/react-state-usereducer-usestate-...