ChatWebAPIUtils in the Chat example seems dirty
The Chat example does the following in the top level app.js :
ChatExampleData.init(); // load example data into localstorage
ChatWebAPIUtils.getAllMessages();
...
So getAllMessages() has side effects? Otherwise, why call it and throw away the result? That part doesn't seem clean.
Just following the source... https://github.com/facebook/flux/blob/master/examples/flux-chat/js/utils/ChatWebAPIUtils.js#L29 https://github.com/facebook/flux/blob/master/examples/flux-chat/js/actions/ChatServerActionCreators.js#L20 ...looks like that's needed to initialize the stores with a dispatched action.
The server interaction is getting faked with local storage in the chat app. I wouldn't take it too seriously.
why call getAllMessages on view ??
https://github.com/facebook/flux/blob/master/examples/flux-chat/js/app.js#L23
isn't better to have an action to do this??