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

Chapter 5. Asynchronous Actions

In Chapter 4, Creating Actions, we examined Flux actions in detail—action creator functions in particular. One aspect of action creators we didn't cover was asynchronous behavior. Asynchronicity is central to any web application, and in this chapter, we'll think about what this means for a Flux architecture.

We'll start by covering the synchronous nature of Flux, as breaking this synchronicity breaks the whole architecture. Next, we'll dive into some code that makes API calls and some action creators that need to synchronize multiple API calls before actually dispatching the action. Then, we'll introduce promises as return values from action creator functions.

Keeping Flux synchronous

It may sound strange that we would ...

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