{"_id":"56a44cd75fb2530d00421b6f","__v":6,"project":"56000f0d8c0c9d0d00dcad21","category":{"_id":"560e3ce7ad6b200d00ff471c","pages":["560e403bc4e4ae0d00b42ed7","560e4066ad6b200d00ff471e","5615e7f2a6767c0d0016699b","56a44cd75fb2530d00421b6f"],"project":"56000f0d8c0c9d0d00dcad21","__v":4,"version":"56000f0e8c0c9d0d00dcad24","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-10-02T08:14:31.057Z","from_sync":false,"order":2,"slug":"architecture-foundations","title":"Architecture Foundations"},"githubsync":"","user":"5600910981a9670d006d144f","version":{"_id":"56000f0e8c0c9d0d00dcad24","project":"56000f0d8c0c9d0d00dcad21","__v":13,"createdAt":"2015-09-21T14:07:10.176Z","releaseDate":"2015-09-21T14:07:10.176Z","categories":["56000f0e8c0c9d0d00dcad25","56008f2497f69f1700f21a36","560091601503430d007cc936","560e0d8054af2b0d005bbe92","560e3ce7ad6b200d00ff471c","560e3cf2c4e4ae0d00b42ed1","561c81d0e822e12b00e1fe00","561c81e9e822e12b00e1fe01","561c823d20b4a92b007d5147","56257f8951bf1c0d001f660a","562d5f165bd25e0d0054dbd4","562d68d5d38b650d0044472a","56421aebb0dc090d00f88438"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-01-24T04:02:31.445Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"The [Flux architecture](http://facebook.github.io/flux/docs/overview.html) developed by Facebook, solves the problem of scattered view state for applications built upon [React](http://facebook.github.io/react/) components. Its not a real framework, more a set of simple conventions and ideas that play well together.\n\nThe core idea of Flux is to centralize the front-end logic into **stores**, the only places where application state is managed. They are what you might call *view model* in other frameworks, except that they don't have to map directly to the concept of a *thing* (e.g: Todo). \n\nStores manage state, and listen for defined events happening in the View layer. This could be anything, from a `VideoPlaybackStore` that manages the current state of a video player, to a [TodosStore](https://github.com/meteor-space/TodoMVC/blob/master/client/stores/todos_store.js) that manages a list of todos. The store depends on any number of data sources, reactive or non-reactive, then exposes an API for the components to use. When a matching event is heard, the store updates it's reactive properties by calling the supplied function. Components depend on a store for external state rather than a data source directly, which creates a highly decoupled and testable system, increasing the maintainability of an evolving system.","excerpt":"","slug":"flux","type":"basic","title":"Flux"}
The [Flux architecture](http://facebook.github.io/flux/docs/overview.html) developed by Facebook, solves the problem of scattered view state for applications built upon [React](http://facebook.github.io/react/) components. Its not a real framework, more a set of simple conventions and ideas that play well together. The core idea of Flux is to centralize the front-end logic into **stores**, the only places where application state is managed. They are what you might call *view model* in other frameworks, except that they don't have to map directly to the concept of a *thing* (e.g: Todo). Stores manage state, and listen for defined events happening in the View layer. This could be anything, from a `VideoPlaybackStore` that manages the current state of a video player, to a [TodosStore](https://github.com/meteor-space/TodoMVC/blob/master/client/stores/todos_store.js) that manages a list of todos. The store depends on any number of data sources, reactive or non-reactive, then exposes an API for the components to use. When a matching event is heard, the store updates it's reactive properties by calling the supplied function. Components depend on a store for external state rather than a data source directly, which creates a highly decoupled and testable system, increasing the maintainability of an evolving system.