Created
June 28, 2020 19:03
-
-
Save ra9dev/f4e6be0da68492605f7e8f74398d845a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| // ... 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