O'Reilly logo

Flux Architecture by Adam Boduch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Enforcing unidirectional data flow

If new data only enters the system via action payloads delivered by the dispatcher and our store data is immutable, we have a unidirectional data-flow. This is the goal, so the questions is, how do we enforce this? Can we simply say that our store data is immutable and be done with it? Well, that's something to shoot for, absolutely, but there's more to it than that.

In this section, we'll address the concept of data flowing in unintended directions, and what causes this to happen. We'll then consider the notion of having too many stores and not enough actions as contributors to dysfunctional data-flows. Finally, we'll examine some techniques that we can utilize to make our store data immutable.

Backwards, sideways, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required