2015-08-13 23:54:40 +02:00
---
layout: pattern
title: Flux
folder: flux
2015-08-15 18:03:05 +02:00
permalink: /patterns/flux/
2019-12-13 21:09:28 +02:00
categories: Structural
2021-05-19 10:49:05 -06:00
language: en
2015-12-28 15:52:44 +02:00
tags:
2019-12-13 21:09:28 +02:00
- Decoupling
2015-08-13 23:54:40 +02:00
---
2016-01-03 21:14:30 +01:00
## Intent
Flux eschews MVC in favor of a unidirectional data flow. When a
2015-08-13 23:54:40 +02:00
user interacts with a view, the view propagates an action through a central
dispatcher, to the various stores that hold the application's data and business
logic, which updates all of the views that are affected.
2019-12-07 20:01:13 +02:00
## Class diagram
2015-08-13 23:54:40 +02:00

2016-01-03 21:14:30 +01:00
## Applicability
Use the Flux pattern when
2015-08-13 23:54:40 +02:00
2015-08-15 18:03:05 +02:00
* you want to focus on creating explicit and understandable update paths for your application's data, which makes tracing changes during development simpler and makes bugs easier to track down and fix.
2015-09-03 18:17:07 +05:30
2016-01-03 21:14:30 +01:00
## Credits
2015-09-03 18:17:07 +05:30
* [Flux - Application architecture for building user interfaces ](http://facebook.github.io/flux/ )