Last active
September 3, 2018 06:05
-
-
Save suzdalnitski/27b237a241e9beca79830e49a6803ccb 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 SimpleForm extends React.Component { | |
state = { | |
firstName: "", | |
}; | |
onFirstNameChange = event => | |
this.setState({ | |
firstName: event.target.value | |
}); | |
render() { | |
return ( | |
<div> | |
<input type="text" name="firstName" onChange={this.onFirstNameChange} /> | |
<Greetings firstName={this.state.firstName} /> | |
</div> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment