学习反应,我期待在谷歌的MaterialUI文档,它显示了一个语法看起来像:这是什么JavaScript ES6语法?
ERROR in ./client/App.jsx
Module build failed: SyntaxError: Unexpected token (23:8)
21 | }
22 |
> 23 | state = {
| ^
24 | open: false,
25 | };
26 |
:
export default class DialogExampleModal extends React.Component {
state = {
open: false,
};
handleOpen =() => {
this.setState({open: true});
};
...
巴贝尔与ES2015是在这段代码的状态=部分失败
我的问题是,这是什么语法,我有可能配置错误的东西?看来其他ES2015语法工作正常。
您在第21行缺少分号。 – cdhowie