1

I'm getting this error when i run the app on android

enter image description here

My AppNavigation code as follow

import React, {Component} from 'react'
import { createStackNavigator } from 'react-navigation-stack'
import Home from '../pages/Home'
import DetailsAdd from '../pages/DetailsAdd'
import ImagesAdd from '../pages/ImagesAdd'

const AppNavigation = createStackNavigator(
  {
    DetailsAdd: { screen: DetailsAdd },
    ImagesAdd: { screen: ImagesAdd },
    Home: { screen: Home },
  },
  {
    initialRouteName: 'Home'
  }
)

export default AppNavigation

  class App extends React.Component {
    render() {
        return <AppNavigator/>;
  }
}

ImagesAdd Class path is correct, How can I fix this issue?

1
  • 1
    try to close node server and rerun app Commented Oct 27, 2019 at 16:33

1 Answer 1

2

Have you got any app container? if you not, you should check this link.

important note from React Navigation Docs

createStackNavigator is a function that returns a React component. It takes a route configuration object and, optionally, an options object (we omit this below, for now). createAppContainer is a function that returns a React component to take as a parameter the React component created by the createStackNavigator, and can be directly exported from App.js to be used as our App's root component.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.