![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
react
lemon丶csdn
jj 同仁堂在逃枸杞
展开
-
Parsing error: Using the export keyword between a decorator and a class is not allowed. Please use `
使用修饰器报错 用create-react-app脚手架搭建react项目 在使用到mobx的时候 用到了修饰器 报了以上错误 百度了一下,发现是使用修饰器之后,eslint会报错 解决方案如下: 打开package.json 找到 eslintConfig 添加以下代码 "parserOptions": { "ecmaFeatures": { "legacyDecorators": true } }, 这样就OK ...原创 2021-04-05 10:19:03 · 1134 阅读 · 0 评论 -
mobx修饰器警告 对修饰器的实验支持功能在将来的版本中可能更改。在 “tsconfig“ 或 “jsconfig“ 中设置 “experimentalDecorators“ 选项以删除此警告
mobx的修饰器警告 对修饰器的实验支持功能在将来的版本中可能更改。在 “tsconfig“ 或 “jsconfig“ 中设置 “experimentalDecorators“ 选项以删除此警告。 使用mobx的修饰器 vs code 的警告 解决方案: 打开vscode 选择文件 首选项 设置 搜索 experimentalDecorators 把该选项打上勾勾 ...原创 2021-04-04 15:28:19 · 351 阅读 · 0 评论