Skip to content

Instantly share code, notes, and snippets.

@goatslacker
Created February 12, 2015 20:57
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 goatslacker/364daaa2e6fa5c6a1daa to your computer and use it in GitHub Desktop.
Save goatslacker/364daaa2e6fa5c6a1daa to your computer and use it in GitHub Desktop.
var Alt = require('alt')
var alt = new Alt()
function S() { }
S.getUserById = function (id) {
var { users } = this.getState()
if (users[id]) {
return users[id]
} else {
UserActions.getUserId(id)
}
}
alt.createStore(S, 'UserStore')
S.getUserById() // might return might not?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment