Improving store registration

We can't improve the work-flow of the dispatcher without improving the work-flow of our stores. Thankfully, the hard work has already been implemented by the dispatcher. We just need to implement our stores in a way that best utilizes the improvements we've made to the dispatcher. In this section, we'll discuss implementing a base store class, followed by some example implementations of stores that extend it and implement their own action methods.

Base store class

The new dispatcher we've just implemented has some important differences from Facebook's reference implementation. The two key differences are that the store registers an instance of itself instead of a callback function, and that the store needs to implement ...

Get Flux Architecture now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.