Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Notes From The Future: Beyond Flux

Notes From The Future: Beyond Flux

Flux is a simple and powerful data model for React, but I'm not convinced it is the best answer for modeling data flows in a front-end application. Learn how ideas inspired by functional programming and Om like immutable data and cursors can help you make it easier to reason about your application.

Jamison Dance

December 03, 2014
Tweet

More Decks by Jamison Dance

Other Decks in Programming

Transcript

  1. Flux "Flux eschews MVC in favor of a unidirectional data

    flow. When a user interacts with a React view, the view propagates an action through a central dispatcher, to stores that hold the application's data and business logic, which updates all of the views that are affected."
  2. "Much of what makes application development difficult is tracking mutation

    and maintaining state. Developing with immutable data encourages you to think differently about how data flows through your application. Subscribing to data events throughout your application, by using Object.observe, or any other mechanism, creates a huge overhead of book-keeping which can hurt performance and creates opportunities for areas of your application to get out of sync. Since immutable data never changes, subscribing to changes throughout the model is a dead-end and new data can only ever be passed from above."