Skip to content

Instantly share code, notes, and snippets.

@bensmithett
Created February 11, 2015 22:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bensmithett/6c26e813ae05c5d562f5 to your computer and use it in GitHub Desktop.
Save bensmithett/6c26e813ae05c5d562f5 to your computer and use it in GitHub Desktop.
@orodio's melbjs flux talk

Make server calls from action creator, but don't dispatch an action. When the promise resolves, call another function that actually dispatches an action.

dispy is cool, abstracts a bit of boilerplate

  • Store.subscribe/unsubscribe
  • Stores register individual callbacks for each action rather than a big switch.
  • Simple mixin to get initial state & update it with one function (in controller view) mixins: [subscribe(state, store)]

orodio/melbjs-feb-2015

Loading spinner resets component internal state back to null or loading, next render will blow that away?

@orodio
Copy link

orodio commented Feb 11, 2015

I know the 99 design guys are doing the loading stuff with promises, sounded like an interesting approach. @xzyfer on twitter would be the one to talk to about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment