@@ -4,13 +4,11 @@ class TestComponent extends React.Component {
constructor(props) {
super(props);
this.state = {text: ''};
-
- this.onChange = this.onChange.bind(this);
}
- onChange(e) {
+ onChange = e => {
this.updateText(e.target.value);
- }
+ };
updateText = text => {
this.setState({text: text});