Skip to content

Instantly share code, notes, and snippets.

@whitneyburton
Created January 10, 2020 20:24
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 whitneyburton/904698b418bf24a88ac2a2b980bf7430 to your computer and use it in GitHub Desktop.
Save whitneyburton/904698b418bf24a88ac2a2b980bf7430 to your computer and use it in GitHub Desktop.
React.useEffect(() => {
console.log('componentDidMount - rendered!');
channel.sendMessage({
text: 'Welcome to our customer chat with React Hooks tutorial!',
});
return function cleanUp() {
console.log(
`You have ${channel.state.messages.length} stored in local state. Goodbye!`
);
};
}, []);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment