Skip to content

Instantly share code, notes, and snippets.

@kazuooooo
Created February 5, 2022 15:11
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 kazuooooo/b4d1cfcd5b4dfee8e3fd12d2859fca2d to your computer and use it in GitHub Desktop.
Save kazuooooo/b4d1cfcd5b4dfee8e3fd12d2859fca2d to your computer and use it in GitHub Desktop.
async setup() {
// It's very vervose...
onSnapshot(docRefA, (ds) => {
if (ds.exists()) {
this.$patch({ docDataA: ds.data() })
}
})
onSnapshot(docRefB, (ds) => {
if (ds.exists()) {
this.$patch({ docDataB: ds.data() })
}
})
onSnapshot(docRefC, (ds) => {
if (ds.exists()) {
this.$patch({ docDataC: ds.data() })
}
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment