2
我试图创建一个无状态的功能组件在反应,但它看起来像巴贝尔有一些麻烦transpiling。片段export default AppLayout =() => {};
被转译为exports.default = AppLayout = function AppLayout() {};
,其中给出以下错误Uncaught ReferenceError: AppLayout is not defined
。巴贝尔错误地transpiles出口默认函数
我正在使用以下预设运行babel stage-0
,es2015
和react
。我在流星中使用了这个语法,所以我猜测它是我缺少的一个模块。
谢谢你,我怎么就不能在一个行它 – svendjokumsen
如果不给一个名字:出口默认值()=>