Channelizer
Channelizer lets you combine the power of Flux Dispatchers and Reducers within a message queuing interface. Channelizer can be used as both a Store and a Dispatcher.
Take for instance the following (slightly altered) example written by Facebook
// TodoDispatcher.js; const instance = ;; const dispatch = instancedispatch;
// TodoStore.js;;; { return Immutable; } { }const instance = TodoDispatcher;;
This can be simplified...
// TodoChannels.js// Combines the functionality of TodoDispatcher and TodoStore;; { return Immutable; } { receiver; }const instance = ;;
Dispatch and Store functionality
;; // If you want to use TodoChannel as a store // It's just like you expect static { return TodoChannels } { // Note we're accessing the TodoChannels store dispatcher. // We specify the channel as a string and place all data in "outgoing" // Outgoing is then sent to the channel controller as "incoming" TodoChannels; }