React-native-router-flux: There is no route defined for key {route}.

Created on 18 Aug 2017  路  7Comments  路  Source: aksonov/react-native-router-flux

Version

Tell us which versions you are using:

  • react-native-router-flux v4.0.0-beta.18
  • react-native v0.45.1

Expected behaviour

Actions.{route}() should work and navigate me to scene.

Actual behaviour

Throws error ExceptionsManager.js:63 There is no route defined for key {route}. Must be one of: 'root','newBroadcast'

Steps to reproduce

For non-obvious bugs, please fork this component, modify Example project to reproduce your issue and include link here.

This is my routes.

<Router>
  <Scene modal={true} hideNavBar>
    <Stack key='root' renderTitle={navBarLogo}>
    <Scene key='loading' component={LoadingPage} hideNavBar={true} inital />
    <Scene key='splash' component={NewRegisterPage} type="replace" hideNavBar={true}  />
    <Scene key='feed' component={FeedPage} type="reset"  />
  </Stack>
  <Scene key='newBroadcast' component={NewBroadcastPage} direction='vertical' />
  </Scene>
</Router>

Actions.feed() throw me the no route defined error. I'm at my wit's end and would appreciate any form of help.

Most helpful comment

Have you tried to use replace instead?

All 7 comments

After some diagnosing, I realise the type='reset' is the one causing the issue. Does anyone have any idea on how to fix this?

Have you tried to use replace instead?

Hey @aksonov, not sure why I haven't tried this previously but using type={ActionConst.REPLACE} fixed the issue. Will submit a PR for the docs. Thank you!

hello
how are you?
did you solve error???

anyone solve this error.. replace is not working.

Please open a new issue with the details of your error and sample code to help someone to jump on this.

@daviscabral i open this issue here #3104

Was this page helpful?
0 / 5 - 0 ratings

Related issues

moaxaca picture moaxaca  路  3Comments

wootwoot1234 picture wootwoot1234  路  3Comments

basdvries picture basdvries  路  3Comments

tonypeng picture tonypeng  路  3Comments

kirankalyan5 picture kirankalyan5  路  3Comments