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 [1] https://github.com/pmndrs/zustand