[英]cannot export (currently unable) in React Native
What I want to do is:我想做的是:
export * as counterActions from './counter';
and the error says:错误说:
Support for experimental syntax 'exportNameSpaceFrom' isn't currently enabled.
当前未启用对实验性语法“exportNameSpaceFrom”的支持。 Add @babel/plugin-proposal-export-namespace-from to the plugins section of your Babel config to enable transformation.
将 @babel/plugin-proposal-export-namespace-from 添加到 Babel 配置的 plugins 部分以启用转换。
I added the plugin but still doesn't work.我添加了插件但仍然不起作用。
Try this:尝试这个:
import * as counterActions from './counter';
export default counterActions;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.