Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is no route defined for key {route}. #2261

Closed
signorekai opened this issue Aug 18, 2017 · 7 comments
Closed

There is no route defined for key {route}. #2261

signorekai opened this issue Aug 18, 2017 · 7 comments

Comments

@signorekai
Copy link

signorekai commented Aug 18, 2017

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.

@signorekai
Copy link
Author

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

@aksonov
Copy link
Owner

aksonov commented Aug 18, 2017

Have you tried to use replace instead?

@signorekai
Copy link
Author

signorekai commented Aug 18, 2017

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!

@JanSros1
Copy link

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

@ZeroCool00
Copy link

anyone solve this error.. replace is not working.

@daviscabral
Copy link
Collaborator

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

@ZeroCool00
Copy link

@daviscabral i open this issue here #3104

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants