Skip to content

Instantly share code, notes, and snippets.

@BrightnBubbly
Created April 20, 2020 00:26
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 BrightnBubbly/443e9a5041d03462529543b8b38228d6 to your computer and use it in GitHub Desktop.
Save BrightnBubbly/443e9a5041d03462529543b8b38228d6 to your computer and use it in GitHub Desktop.
channel.watch().then(state => {
channel.on('message.new', event => {
const messages = [...messageDataRef.current, event.message];
setMessageData(messages);
});
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment