Published
Edited
Sep 14, 2020
Importers
5 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
increment = {
let unsubscribe;
let doc = await app.firestore().collection("observable-counter").doc("counter");
(function subscribe() {
unsubscribe = doc.onSnapshot(doc => {
mutable count = doc.data().count
});
})();
invalidation.then(() => {
unsubscribe();
});

return () => { doc.update({ count: firebase.firestore.FieldValue.increment(1) }) };
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more