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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.