This video is available to students only

Flux#

Images and examples in this lesson are from the official Facebook Flux overview page and official Redux getting started guide.

Flux applications have three major parts: the dispatcher, the stores, and the views (React components). Data in a Flux application flows in a single direction:

source: https://facebook.github.io/flux/docs/in-depth-overview

A unidirectional data flow is central to the Flux pattern, and the above diagram should be the primary mental model for the Flux programmer.

What this means is that data always flows from the parent component to the child component. Unlike Angular and other frameworks where updating a property in the child component would update it for the parent too (i.e. globally), this is not the case with Flux.

source: https://facebook.github.io/flux/docs/in-depth-overview

A Flux application, from the component's points of view, is a set of actions that it can perform, and these actions are predefined. These actions are assigned a type and passed to stores by dispatchers. Stores contain the application state and logic, which then update the application's state. This change in state is then reflected in views by controller-views which are listening for change.

Redux#

Start a new discussion. All notification go to the author.