Flux-off

A small application using React.js and a handmade Flux implementation.

View the Project on GitHub kingscott/flux-off

Flux-off m8!

Flux-off is a small and naive introduction to the Flux program architecture and React.js. Flux is not a framework or library, it is a program architecture that enforces certain principles to be considered a Flux application.

The Flux 'flow' looks like this:
Action -> Dispatcher -> Store -> View
Flux harps on unidirectional data flow and the idea that we don't want to directly mutate state.

Flux brings a lot to the table in terms of modularity and organization. The main three things we need when creating a Flux application is: a dispatcher, store(s) and views. The views are are at the 'bottom', where they receive data from the stores which are passed down to children. Actions, also referred to as dispatcher methods, are an index for the types of changes/events that take place within the application.

When a user interacts with a view, an acton is dispatched through the store, it is then passed down to the view which is trigger a virtual DOM render and diff from the actual DOM. If something in the view has changed, an action is dispatched and the cycle continues.