DEV Community

kris
kris

Posted on

I love react but hate redux need advice for avoid

Top comments (5)

Collapse
 
rdhox profile image
rdhox

I agree that redux can be a pain to manage, but it still for me the best library for state management once we remove the pain.

For that you have different solutions that make it easy to use redux.

I would recommand first DVA (github.com/dvajs/dva), chinese framework/plugin from the framework UMIJS. I would never have use redux without it. It just make the use of redux and redux-saga so simple, and make your project well organized, that I think it is the best framework for react development out there. The only problem, and the reason why you never heard of it, it's because it's chinese. But in Asia, it's the main tool for developing with React. It's used in production a lot (especially in Alibaba tech), so it's robust.

Dva is awesome but opinionated. Because of that I developed my own tool that take the idea of Dva of using object call models to organize yours states/reducers/listeners/effects with Redux and Redux-Saga and that it. It's not even a React framework. I want to open source it but I have lot of work for the moment and don't have the time. If you, reader, is interested to help me finish the doc and make it open, please send me a message. The code has been already used in production, and work great.

Other solution that I found recently, that also is inspired by Dva and seems great, it's Rematch (rematch.gitbooks.io/rematch/).
it takes the models structure from dva and seems very nice to use but doesn't incorporate Redux-Saga.

I advise you to try rematch, I think this is what will suit you the most. But Dva is great and make the use of redux-saga very easy too, so keep it in mind in case you need to use some sagas!

Collapse
 
ajboni profile image
ajboni

+1 for mobx, it's really easy to start with little boilerplate

Collapse
 
deciduously profile image
Ben Lovy

MobX? Built-in state/hooks? Redux is a common pattern but far from integral to React.

Collapse
 
vonheikemen profile image
Heiker

This should be an interesting read for you: Application State Management with React

Collapse
 
niorad profile image
Antonio Radovcic

In the end it depends on the project. You can go pretty far with the simple ol' built-in state.