Skip to content

Instantly share code, notes, and snippets.

@prmichaelsen
Created September 30, 2019 23:21
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 prmichaelsen/4c048b0d27ed54e8bedecc53dbf62d2d to your computer and use it in GitHub Desktop.
Save prmichaelsen/4c048b0d27ed54e8bedecc53dbf62d2d to your computer and use it in GitHub Desktop.
function getParticipantNames() {
// Because queries are cached, using the `allParticipants` query
// prevents another roundtrip to the database
const participants = database.getAllParticipants();
return participants.map(p => p.name);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment