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

Error: There is no route for key home . must be one of drawer #3024

Closed
zurez opened this issue May 7, 2018 · 3 comments
Closed

Error: There is no route for key home . must be one of drawer #3024

zurez opened this issue May 7, 2018 · 3 comments

Comments

@zurez
Copy link

zurez commented May 7, 2018

Version

Tell us which versions you are using:

  • react-native-router-flux v4.
  • react-native v0.50.4

Expected behaviour

Actions.reset("home") should navigate to Scene with "home" key.

Actual behaviour

Red Screen Error:There is no route for key home . must be one of drawer

Steps to reproduce

Android:
`

               <Drawer
                hideNavBar
                key="drawer"
                open={this.state.show_drawer}
                type="overlay"
                content={<SideBar toggle_drawer={this.toggle_drawer}/>}
                drawerWidth={200}
                
                tapToClose={true}
                openDrawerOffset={0.6}
                
                closedDrawerOffset={-3}
                
                               
                >
          
                <Scene hideNavBar={true}  key="home" 

                onEnter={this.state.is_authenticated} component={HomeScreen}  />

               
                  </Drawer>
            </Stack>

        </Router>

`

@zurez
Copy link
Author

zurez commented May 7, 2018

@aksonov
Copy link
Owner

aksonov commented Jun 6, 2018

It is not correct usage of reset - you are trying to make home only one scene of the app, but it is not true - drawer is top-level within your Example

@aksonov aksonov closed this as completed Jun 6, 2018
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

2 participants