4 ms·
Just fyi, there is no need to use Redux just because you're using React. If it's a pretty simple case, you can use the built in `useReducer`[0]. Or if you want
by westoncb 5y ago
Just fyi, there is no need to use Redux just because you're using React.
If it's a pretty simple case, you can use the built in `useReducer`[0].
Or if you want something that'll scale but that's much more lightweight than Redux, I'd recommend Zustand[1].
[0] https://reactjs.org/docs/hooks-reference.html#usereducer https://reactjs.org/docs/hooks-reference.html#usereducer
[1] https://github.com/pmndrs/zustand https://github.com/pmndrs/zustand
- lIIIllllIIII 5y agoZustand looks so nice. I wanted to create my own state management library just for fun and spent a while brainstorming it and then ran into Zustand which basically does exactly what I wanted (but has presumably been developed by people who know what they're doing_
- girvo 5y agoAmen. We've entirely just used `useReducer` in combo with `useContext` where needed, and its been brilliant (this is a 100k LOC React app)