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

Handling store dependencies

So far in this book, we've treated our Flux store dependencies implicitly. The order in which we imported the store modules determined the order in which actions were handled, which has implications if something we depend on hasn't been updated yet. It's time to start treating our store dependencies with a little more rigor.

In this section, we'll introduce the waitFor() mechanism of the Flux dispatcher to manage store dependencies. Then, we'll talk about two types of store dependencies we might have. The first type of dependency is strictly related to application data. The second type of dependency is related to UI elements.

Waiting for stores

The dispatcher has a built-in mechanism that allows us to explicitly resolve ...

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