Thunder_24
Thunder_24

Reputation: 25

Got this error in app.js trying to run this code again but getting the same error help me guys

import { createAppContainer } from 'react-navigation';
import { createStackNavigator } from 'react-navigation-stack';
import HomeScreen from "./src/screens/HomeScreen";
import ComponentsScreen "./src/screens/ComponentsScreen";

const navigator = createStackNavigator(
    {
		Home: HomeScreen,
		Components: ComponentsScreen,
	},
	{
		initialRouteName: 'Components',
		defaultNavigationOptions: {
			title: 'App'
		}	
	}
);

  export default createAppContainer(Navigator);

Got this error when i try to run the code in mobile using expo

got this error in app.js file when running in mobile help me

Upvotes: 1

Views: 39

Answers (1)

Dylan Landry
Dylan Landry

Reputation: 1290

You're missing the from on the fourth line.

Change:

import ComponentsScreen "./src/screens/ComponentsScreen";

To:

import ComponentsScreen from "./src/screens/ComponentsScreen";

Upvotes: 1

Related Questions