You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Decorators are not officially supported yet in 6.x pending a proposal update.
However, if you need to use them you can install the legacy decorators transform with:
npm install babel-plugin-transform-decorators-legacy --save-dev
and add the following line to your .babelrc file:
{
"plugins": ["transform-decorators-legacy"]
}
在Counter的demo中应用了mobx, 但是开始运行的时候总是报错,报错信息如下
Decorators 装饰者模式是ES7中提案,要支持这个需要安装一个
babel-plugin-transform-decorators-legacy
的插件,并且需要修改.babelrc中的配置The text was updated successfully, but these errors were encountered: