The component for route 'Profile' must be a React component

#1

Good afternoon, RN-heros. Please, help a newbie to Expo complete the task given.

I’m quite new to RN, so when I add new screen to app.js, Expo shows an error. Here’s the initial code:

const ExplorerApp = StackNavigator({
  Home: { screen: Screens.ComponentsScreen },
  ...
  ChoiceCustomization: { screen: Screens.ChoiceCustomizationScreen },

So I add another one alias to link new screen to the definite section in main page:

const ExplorerApp = StackNavigator({
  Home: { screen: Screens.ComponentsScreen },
  ...
  ChoiceCustomization: { screen: Screens.ChoiceCustomizationScreen },
  **Profile: { screen: Screens.ProfileScreen },**

When the last string is added, Expo throws an error:

The component for route ‘Profile’ must be a React component.

So what should I do to make Profile screen a ‘component’?

0 Likes

closed #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.

0 Likes