React native 不变冲突:模块AppRegistry不是已注册的可调用模块(调用UnununtapplicationComponentAtrottag)
index.jsReact native 不变冲突:模块AppRegistry不是已注册的可调用模块(调用UnununtapplicationComponentAtrottag),react-native,React Native,index.js import {AppRegistry} from 'react-native'; import TabBar from './src/Navigation/TabBar'; import {name as appName} from './app.json'; import App from './App'; AppRegistry.registerComponent(appName, () => App); App.js import { Platform }
import {AppRegistry} from 'react-native';
import TabBar from './src/Navigation/TabBar';
import {name as appName} from './app.json';
import App from './App';
AppRegistry.registerComponent(appName, () => App);
App.js
import { Platform } from 'react-native';
//component cycle
import TabBar from './src/Navigation/TabBar'
//External Library
import SplashScreen from 'react-native-splash-screen'
import codePush from "react-native-code-push";
//For Redux
import { PersistGate } from 'redux-persist/integration/react'
import { Provider } from 'react-redux'
import store, { persistor } from './store'
class App extends Component {
componentDidMount() {
SplashScreen.hide();
}
componentWillMount() {
codePush.disallowRestart();
}
render() {
return (
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<TabBar />
</PersistGate>
</Provider>
);
}
}
从'react native'导入{Platform};
//成分循环
从“./src/Navigation/TabBar”导入TabBar
//外部图书馆
从“反应本机启动屏幕”导入启动屏幕
从“反应本机代码推送”导入代码推送;
//对于Redux
从“redux persist/integration/react”导入{PersistGate}
从“react redux”导入{Provider}
导入存储,{persistor}来自“/store”
类应用程序扩展组件{
componentDidMount(){
SplashScreen.hide();
}
组件willmount(){
codePush.DisallowArt();
}
render(){
返回(
);
}
}
所以请告诉我如何清除错误我已经从项目中清除了缓存,但是我得到了相同的错误
错误不变冲突:模块AppRegistry不是已注册的可调用模块(调用
运行(应用程序)
错误不变冲突:模块AppRegistry不是已注册的可调用模块(调用UnuntapplicationComponentAtrottag)您尚未使“应用”组件可导出
尝试此操作并添加“导出默认值”
export default class App extends Component