2
我試圖創建一個無狀態的功能組件在反應,但它看起來像巴貝爾有一些麻煩transpiling。片段export default AppLayout =() => {};
被轉譯爲exports.default = AppLayout = function AppLayout() {};
,其中給出以下錯誤Uncaught ReferenceError: AppLayout is not defined
。巴貝爾錯誤地transpiles出口默認函數
我正在使用以下預設運行babel stage-0
,es2015
和react
。我在流星中使用了這個語法,所以我猜測它是我缺少的一個模塊。
謝謝你,我怎麼就不能在一個行它 – svendjokumsen
如果不給一個名字:出口默認值()=>