这是我的.babelrc
:
{
"presets": [
"@babel/preset-env",
"@babel/preset-react"
]
}
这是错误的来源。\client\src\components\AddBook.js:
const { handleSubmit, pristine, reset, submitting } = this.props;
错误信息
11 | }
12 |
> 13 | const { handleSubmit, pristine, reset, submitting } = this.props;
| ^
14 |
15 | const handleSubmit = (allValues) => {
16 | console.log('formData:', allValues);
我认为@babel/preset-env
处理了所有最新的 JavaScript 语法。是什么让代码中断?完整的仓库在https://github.com/ElAnonimo/booklist