The problem of Flux

@MichalZalecki

WHAT
THE
FLUX
IS?

IS
IT
A
LIBRARY?

IS
IT
A
FRAMEWORK?

IS
ANGULARJS
STILL
COOL?

NO.

NO.

...No 

So
WHAT

FLUX

IS?

PATTERN!!!!!!11

No. Better.

Yes. But...

first things first

NOT RLY.

PROBLEM 1.

Store have to register itself to all actions dispatch

PROBLEM 2.

waitFor is a lie

https://github.com/facebook/flux/blob/master/src/Dispatcher.js

PROBLEM 3.

Constants management sucks

PROBLEM 4.

Not so functional as it could be or as we wish it was

PROBLEM 5.

Boilerplate

PROBLEM 6.

Misunderstanding where this boilerplate is

PROBLEM 7.

It's hard to determine which state the action is going to change

3 Attempts to solve those problems

goatslacker/alt

  • Problem 1. Store binds its handlers to particular actions
  • Problem 3. Constants are generated by alt.createActions

rackt/redux

  • Problem 1. Still exists but you can combineReducers.
  • Problem 2. No lies (a.k.a. no waitFor). You don't need it.
  • Problems 4 and 5. No real boilerplate
  • Problem 7. There is sth you can do although you won't find the answer in the docs.

reflux/refluxjs

  • Problem 1. Listen only for actions which do matter for you
  • Problem 2. No lies (a.k.a. no waitFor). You don't need it.
  • Problem 3. Everything is a function.
  • Problems 4 and 5. No boilerplate at all.
  • Problems 6 and 7. Beyond the sope of the implementation. Do what you want.

Questions?

@MichalZalecki

The problem of Flux

By Michał Załęcki

The problem of Flux

  • 3,316