Am I missing a loader possibly? I thought we were supposed to be able to use these ES6 functions in component bodies to avoid having to do the .bind(this)
syntax react docs
ERROR in ./client/admin-side/components/Form.jsx
Module build failed: SyntaxError: Unexpected token (15:17)
14 |
> 15 | handleChange = (event) => {
| ^
16 | this.setState({value: event.target.value})
17 | }
My .babelrc has the following:
{
"presets": ["env", "react"],
"plugins": ["transform-object-rest-spread"]
}
and I am using babel-loader
for js/jsx documents