DEV Community

Discussion on: My thoughts on endless battle of React state management libraries (setState/useState vs Redux vs Mobx)

kevin074 profile image

I agree with your observations, namely that if everything's inside the store then you'd have a centralized place for everything. However, I think that's exactly the drawback of the. We had a relatively small app that used redux and had all types of data, global state and service responses, stored in there.

It quickly became a nightmare when there are scaffolding after scaffolding for getting stuffs, which was hard to explain to our team lead who had no hand in building it. It felt as if walking in a labyrinth inside the store. If everything was separated completely, store only has global state, service layer is the controller, cache layer is another, then it would be much clearer.

as for writing tests, you may very well be correct, but I am too newbie at test-writing to comment on :P