Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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