DEV Community

Discussion on: Comparing reactivity models - React vs Vue vs Svelte vs MobX vs Solid vs Redux

Collapse
 
bhgsbatista profile image
Samuel Batista • Edited

I think you might want to take a look at immer-reducer, it makes working with Redux a lot simpler: github.com/esamattis/immer-reducer

Here's an example app that uses it: github.com/gamedevsam/calendar-app...

I'm a fan of Mobx myself, but if I was going to pick anything else, it would be Redux with Immer Reducer. Such elegant syntax with first class TypeScript support.

At a high level, immer-reducer turns your reducers into simple classes. Reducer actions are just simple function calls, and you mutate the state directly and under the hood immer is used to generate patches that are applied to the state that is passed to React.

The one disadvantage over Mobx is the need to still write connector components, but that can be a good thing making clear separation between stateless and stateful components depending on who you ask.