Eric Elliott
Feb 14 · 1 min read

What I mean is that network I/O implies additional complexity, such as persisted state or collaboration with external systems. One of the benefits of Redux is that those kinds of things can be triggered by dispatch and received messages can trigger a dispatch to update app state.

When you do it that way instead of only involving the component or a React hook, you get the added benefit of seeing all the important actions in your Redux action logger, which gives you added visibility into exactly which things caused important state changes in your app.

The main benefit of React is deterministic view renders which make it easy to understand why your UI renders what it renders.

The main benefit of Redux is deterministic app state, which makes it easy to understand and debug how your app got into its current state.

Putting a component or React hook in charge of async I/O undermines both of those benefits.

If the network is involved, Redux can make it easier to follow what’s going on with that async I/O, and how it interacts with the rest of your app state.

    Eric Elliott

    Written by

    Make some magic. #JavaScript