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 ...
Get Flux Architecture now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.