Created
January 28, 2018 20:48
-
-
Save Siemko/3917a9007b09433af144beb2d4e3c78d to your computer and use it in GitHub Desktop.
FormSample React.js component
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
import React, { Component } from "react"; | |
export default class FormSample extends Component { | |
state = { | |
employer: "Gorrion" | |
}; | |
handleEmployerChange = e => { | |
this.setState({ employer: e.target.value }); | |
}; | |
render() { | |
return ( | |
<div className="field"> | |
<label className="label">Employer</label> | |
<div className="control"> | |
<input | |
className="input" | |
type="text" | |
onChange={this.handleEmployerChange} | |
value={this.state.employer} | |
/> | |
</div> | |
</div> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment