Gist posted in reply to this jsbin snippet for the comment at Deconstructing Flux post.
In my mind you really should have a single kind of interface for what gets passed on through this.trigger
from a Data Store. In the jsbin example, you're sending both errors and posts, which is not really "single-kind" in my mind. So what if we could split this up into two seperate concepts... why not two seperate data flows?
So if you want to handle errors, then you're better off creating a seperate data flow for that (i.e. start with an error action) so that components that do error messaging specifically use that instead.
The application will look a little like this crude ASCII art:
Actions Stores Components
------- ------ ----------
load ------> postsStore ----> <PostList />
|
+------------+
v
loadError -> errorStore ----> <ErrorMessage />
Hope this helps!
Here is another take reflux/refluxjs#57 (comment) where the WebAPI module is a utility for doing ajax requests.