Skip to content

Instantly share code, notes, and snippets.

@yhoon3002
Created March 28, 2022 07:42
import React from 'react';
class ProfilePage extends React.Component {
showMessage = () => {
alert('Followed ' + this.props.user);
};
handleClick = () => {
setTimeout(this.showMessage, 3000);
};
render() {
return <button onClick={this.handleClick}>Follow</button>;
}
}
export default ProfilePage;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment