Skip to content

Instantly share code, notes, and snippets.

@sle-c
Created September 6, 2018 18:29
Show Gist options
  • Save sle-c/a115d3f05dbf90fddb4959c1e2b200ac to your computer and use it in GitHub Desktop.
Save sle-c/a115d3f05dbf90fddb4959c1e2b200ac to your computer and use it in GitHub Desktop.
subscribe to firebase activities
db.collection("activities").where("userID", "==", currentUserID)
.onSnapshot(function(snapshot) {
snapshot.docChanges().forEach(function(change) {
doSomething(change.doc.data());
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment