Skip to content

Instantly share code, notes, and snippets.

@Lowell20
Lowell20 / firebase-online-user-count-example.md
Created May 14, 2021 23:00 — forked from ajaxray/firebase-online-user-count-example.md
Keep list (and count) of online users in a Firebase web app - by isolated rooms or globally

Gathering.js - How to use

Keep list (and count) of online users in a Firebase web app - by isolated rooms or globally.

Live Demo

Firebase Shared Checklist is a demo application that shows the number of users joined a checklist using gathering.js. Here is a 1 minute screencast of using this application.

@Lowell20
Lowell20 / machine.js
Last active January 10, 2020 02:17
Generated by XState Viz: https://xstate.js.org/viz
const setBatteries = assign({
batteries: (context, event) => {
context.batteries = event.value
}
});
const battsFound = (context, event) => {
return context.batteries.length > 0
};