Skip to content

Instantly share code, notes, and snippets.

@rosschapman
Created April 27, 2020 00:01
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 rosschapman/1a0fa302717232af54c08f41201972cd to your computer and use it in GitHub Desktop.
Save rosschapman/1a0fa302717232af54c08f41201972cd to your computer and use it in GitHub Desktop.
Maybe fetch and display
if (books.ids.length > 0) {
this.stateMachine(this.statuses.waiting as Status);
let suggestedBooks = await this.apiAdapater.books.suggest();
this.stateMachine(this.statuses.success as Status);
this.model.updateAll("suggestedBooks", suggestedBooks);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment