Skip to content

Instantly share code, notes, and snippets.

@ra9dev
Created June 28, 2020 19:03
Show Gist options
  • Select an option

  • Save ra9dev/f4e6be0da68492605f7e8f74398d845a to your computer and use it in GitHub Desktop.

Select an option

Save ra9dev/f4e6be0da68492605f7e8f74398d845a to your computer and use it in GitHub Desktop.
// ... imports
import { prepareMessage } from './prepareMessage'
function ProfilePage(props) {
const showMessage = () => {
const message = prepareMessage(props.user);
alert(message);
};
const handleClick = () => {
setTimeout(() => showMessage(), 3000);
};
return (
<button onClick={handleClick}>Follow</button>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment