Created
December 17, 2019 10:21
-
-
Save paschalidi/fb925f1f9519f1eb6240f0d95573fc87 to your computer and use it in GitHub Desktop.
This file contains 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
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