Last active
July 8, 2016 07:20
-
-
Save kazagkazag/f4829a62a613c12a150088e3f37905f0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 MyForm extends Component { | |
| constructor() { | |
| super(); | |
| this.state = { | |
| value: "Hello!" | |
| } | |
| //bindings here | |
| } | |
| handleChange(event) { | |
| this.setState({value: event.target.value}); | |
| } | |
| render() { | |
| return ( | |
| <form> | |
| <input | |
| type="text" | |
| value={this.state.value} | |
| onChange={this.handleChange} | |
| /> | |
| <textarea | |
| name="description" | |
| value="This is a description." | |
| /> | |
| <select value="B"> | |
| <option value="A">Apple</option> | |
| <option value="B">Banana</option> | |
| <option value="C">Cranberry</option> | |
| </select> | |
| </form> | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment