I am receiving this message when I tried starting my react native app. Usually this kind of format works on other multi screen navigation yet somehow does not work in this c
Create a new file ScreenContainer.js (you can choose the name). Then in the ScreenContainer file add:
import React, { Component } from 'react';
import { createStackNavigator, createAppContainer } from 'react-navigation';
import MainScreen from './MainScreen';
import AboutScreen from './AboutScreen';
const NavigationStack = createStackNavigator({
Main: {
screen: MainScreen,
},
About: {
screen: AboutScreen,
},
});
const Container = createAppContainer(NavigationStack);
export default Container;
Then at your App.js file:
import Container from './ScreenContainer';
class App extends Component {
render() {
return (
);
}
}