DEV Community

Discussion on: Why I Stopped Using Redux

Collapse
 
g_abud profile image
Gabriel Abud

At a certain complexity it may make sense to start using Redux. I am not against Redux as a tool (I say that in the first paragraph) and I think its design is excellent, I'm more against what it encourages us to do.

Having said that you can easily do that many calls with React Query and SWR and have them be cached so they are not refetched every time. You simply use a hook in the components that are needed and don't have to worry about managing your own global store.

Thread Thread
 
mattpocockuk profile image
Matt Pocock

I'd argue that at a low level of complexity, use useReducer, useState and useContext. At a high level of complexity, use XState/useContext. XState handles complexity much better than Redux.

Thread Thread
 
theodesp profile image
Theofanis Despoudis

That implies that you know how to create correct state machines...