无法在 React Native 中使用操作
Not able to use actions in React Native
我正在尝试在我的 React 本机应用程序中实施 Redux 状态管理,但我遇到了一个问题。我在我的 React 应用程序中做了同样的事情并且工作正常。我正在使用打字稿模板。
export * as actionCreators from "./action-creators";
错误
TransformError src/state/index.ts: Export namespace should be first transformed by `@babel/plugin-proposal-export-namespace-from`.
我想你用的是export而不是import,把export换成import再检查
这个问题的简单解决方法是:
import * as actionCreators from './actions/loginAction'
export {actionCreators}
我正在尝试在我的 React 本机应用程序中实施 Redux 状态管理,但我遇到了一个问题。我在我的 React 应用程序中做了同样的事情并且工作正常。我正在使用打字稿模板。
export * as actionCreators from "./action-creators";
错误
TransformError src/state/index.ts: Export namespace should be first transformed by `@babel/plugin-proposal-export-namespace-from`.
我想你用的是export而不是import,把export换成import再检查
这个问题的简单解决方法是:
import * as actionCreators from './actions/loginAction'
export {actionCreators}