Skip to content

Instantly share code, notes, and snippets.

@whitneyburton
Created January 9, 2020 17:44
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/98b2792f93ab7abf6e60f06532ac53b7 to your computer and use it in GitHub Desktop.
Save whitneyburton/98b2792f93ab7abf6e60f06532ac53b7 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