React-native-router-flux: v3 to v4 : Route 'myRoute' should declare a screen.

Created on 20 Jul 2017  路  6Comments  路  Source: aksonov/react-native-router-flux

Hi,

following your advice on #158, I migrated from v3 to v4, I had some issues I fixed, but I'm stuck on this one.

ExceptionsManager.js:63 Route 'splashscreen' should declare a screen. For example:

import MyScreen from './MyScreen';
...
splashscreen: {
  screen: MyScreen,
}

With my Router:

<Router>
               <Scene key="root">

                  <Scene key="splashscreen" component={Splashscreen} title="Splashscreen" initial />
                  <Scene key="login" component={Login} title="Login"/>                            
                  <Scene key="newsfeed" showMainMenu={true} component={Newsfeed} title="Newsfeed" />
                  <Scene key="profile" showMainMenu={true} component={Profile} title="Profile" />
                  <Scene key="jobs" showMainMenu={true} component={Jobs} title="Jobs" />

               </Scene>




             </Router>

As far as I understand, this comes from StackNavigator, but I thought RNRF was handling this?

Most helpful comment

I am getting this too. How did you fix it?

All 6 comments

I guess I messed up with my Components declaration. MyScreen wasn't referencing to any MyScreen component found in this context.

I am getting this too. How did you fix it?

I had this issue, fortunately for me it indicated the undefined import statement. I was missing "export" in the imported subcomponent. Therefore the import failed and my was undefined. So first thing, try to check for this. Maybe that helps someone.

@gardner did you find a fix? I'm currently stuck with the same error

@isaackdamian be sure your Component is a real component, exported and imported correctly.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rafaelcorreiapoli picture rafaelcorreiapoli  路  3Comments

llgoer picture llgoer  路  3Comments

moaxaca picture moaxaca  路  3Comments

wootwoot1234 picture wootwoot1234  路  3Comments

booboothefool picture booboothefool  路  3Comments