Skip to content

Instantly share code, notes, and snippets.

@paschalidi
Created December 17, 2019 10:21
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 paschalidi/fb925f1f9519f1eb6240f0d95573fc87 to your computer and use it in GitHub Desktop.
Save paschalidi/fb925f1f9519f1eb6240f0d95573fc87 to your computer and use it in GitHub Desktop.
class SubmitButton extends React.Component {
constructor(props) {
super(props);
this.state = {
isFormSubmitted: false
};
this.handleSubmit = this.handleSubmit.bind(this);
}
handleSubmit() {
this.setState({
isFormSubmitted: true
});
}
render() {
return (
<button onClick={this.handleSubmit}>Submit</button>
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment