How to fix the code in React and use babel?

Tell me, pass lessons on reacto and this code does not work, the error I realized in setting up webpack or babel , here is the code
import React { Component } from 'react';

class SearchBar extends Component {
constructor(props) {
super(props);

 this.state={ term: '' };
}

 render() {
 return {
the <div>
 <input onchange="{event" => this.setState( { term:event.target.value} ) }/>;
val of inp:
</div>
};
}
}
export default SearchBar;


Says Unexpected token the compiler, and if you throw this code in https://babeljs.io/ it also shows error!
Tell me how to solve?Here is the repository of someone going through the lessons
https://github.com/StephenGrider/ReduxSimpleStarter
June 7th 19 at 15:06
1 answer
June 7th 19 at 15:08
Solution
import React { Component } from 'react';

class SearchBar extends Component {
 constructor(props) {
super(props);

 this.state = { term: '' };
}

 render() {
 return ( // in parentheses is returned if more than 1 row
the <div>
 <input onchange="{event" => this.setState({ term: event.target.value })} />;
</div>
)
}
}
export default SearchBar;
thank you very much, five times through the code,and the bracket didn't pay attention for 3 hours killed, thank you!!! - gilberto_Luettgen commented on June 7th 19 at 15:11

Find more questions by tags JavaScriptReact NativeReact