Last active
December 19, 2018 18:13
-
-
Save stelmakh/02145aeba556b0a0a3daea27294f5e07 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 Input extends React.Component { | |
| onChange = (evt) => { | |
| const { onChange } = this.props | |
| const { value } = evt.target | |
| if (onChange) { | |
| onChange(value) | |
| } | |
| } | |
| render() { | |
| const { | |
| value | |
| } = this.props | |
| return ( | |
| <input | |
| value={value} | |
| onChange={this.onChange} | |
| /> | |
| ) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment