Skip to content

Instantly share code, notes, and snippets.

@thisisjofrank
Created April 22, 2022 13: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 thisisjofrank/a435e8369f3a33238cc7bdf256ada85a to your computer and use it in GitHub Desktop.
Save thisisjofrank/a435e8369f3a33238cc7bdf256ada85a to your computer and use it in GitHub Desktop.
swarm.onConnection = (channel: Types.RealtimeChannelPromise) => {
channel.subscribe("message", (message: Types.Message) => {
counter = message.data.counter;
counterUi.innerText = counter.toString();
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment