Skip to content

Instantly share code, notes, and snippets.

@clalimarmo
Last active October 9, 2015 20:58
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 clalimarmo/7a84ee9b04454f2ff690 to your computer and use it in GitHub Desktop.
Save clalimarmo/7a84ee9b04454f2ff690 to your computer and use it in GitHub Desktop.
const BookStore = function(deps) {
const self = Coherence(deps);
self.handleAction('search-book', searchBook);
return self.fluxSafe();
function searchBook(payload) {
deps.books.fetch(payload.id).then(function(response) {
self.setData('book', response);
})
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment