

There’s quite a lot of ways to use Redux, and there’s no “true” accepted pattern. Soon afterward, Redux came out, and I hopped on the hype train as well.

I had used React previously, and I think as a lot of people felt, never really cared for JSX, but seeing this flow, everything made sense. That week I stopped and rewrote the project to React. I had been programming away on it using Angular 1, my old go-to framework, for a couple of months when I saw my first video about flux. I remember starting a new job as the only front end developer on a new project. To talk about today, let’s take a little walk through a timeline of React state management to see why we’ve made the decisions we have today.įlux architecture is where I’m going to start, and for many people at the time, it was a strong selling point to migrate over from other frameworks. Within the last year or two, there has been a shift in acceptable patterns of react state management. So when you encounter an issue and need to choose the best tool available, you can make an informed decision to do so. What are these tools meant for? Inevitably these blogs will end with an “it depends.” But let’s try to come up with concrete examples where you might want to employ one tool over the other.Īnswering these questions will hopefully give you a strong foundation going forward. What are the fundamental differences in their functionality? People have discussed one or the other being a stand-in replacement. What are some state management philosophies? Before we go any further, I think we should take a step back and ask a couple of simple questions about our choices:

We need to break down some possible architectural decisions in our applications, and then investigate how these tools can both support or derail this architecture. But are these even needed anymore?ĭespite how vocal the community has been on us breaking away from redux, or state management libraries as a whole, the solution isn’t that simple. Not to be left behind, React-redux has joined the hooks train and given you a new way to perform state collection and dispatching with useSelector and useDispatch. We’ve seen React hooks released, and with things like functional states and useReducer, seemingly the option to replace redux. A new implementation of context has launched, which is much simpler and straight forward to use. Within the last year or so, the landscape for state storage in react has seen a tremendous shakeup.
