1
votes

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 }                 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>
        );
    }
    
}

so please tell me how to clear the error I have clear the cache from the project but I have getting the same error

ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication) ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling unmountApplicationComponentAtRootTag)

1

1 Answers

0
votes

you have not make the "App" component exportable

try this and add "export default"

export default class App extends Component