Created
April 22, 2022 13:21
-
-
Save thisisjofrank/8fe1419359865d947b6076bbe4a45966 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
swarm.onElection = (channel: Types.RealtimeChannelPromise) => { | |
leaderUi.innerText = "true"; | |
setInterval(() => { | |
counter++; | |
channel.publish("message", { counter: counter }); | |
console.log("Sent counter", counter); | |
}, 5000); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment