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