Skip to content

Instantly share code, notes, and snippets.

@Siemko
Created Jan 28, 2018
Embed
What would you like to do?
FormSample React.js component
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