Error: There is no route defined for key undefined.
See original GitHub issueVersion
4.0.1
- react-native-router-flux v4.0.1
- react v16.2.0
- react-native v0.52.3
Expected behaviour
Navigating between tabs without any error
Actual behaviour
Error: There is no route defined for key undefined. Must be one of: ‘home’,‘map’,‘restaurant’,‘news’
Here is my Code.
<Router>
<Scene key='root'>
<Scene key="Login" title="Login Page" hideNavBar={true} component={LoginPage} navigationBarStyle={{backgroundColor:'#005696'}} titleStyle={{color:'white'}} headerTintColor='#fff'/>
<Tabs hideNavBar={true} key="tabs" lazy={true} tabs={true} animationEnabled={false} tabStyle={{borderWidth: 1, borderColor: 'rgba(0, 86, 150, 0.3)'}} activeBackgroundColor={'#005696'} labelStyle={{color: '#fff', paddingBottom: 12, fontSize: 15}} tabBarPosition="bottom" tabBarStyle={styles.tabBar}>
<Scene key="home" initial={true} hideNavBar={true} title="Home" component={HomeScreen} navigationBarStyle={{backgroundColor:'#005696'}} titleStyle={{color:'white'}} style={{color:'red'}} headerTintColor='#fff'/>
<Scene key="map" hideNavBar={true} title="Map" component={MapScreen} navigationBarStyle={{backgroundColor:'#005696',}} titleStyle={{color:'white'}} headerTintColor='#fff'/>
<Scene key="restaurant" hideNavBar={true} title="Restaurant" component={RestaurantScreen} navigationBarStyle={{backgroundColor:'#005696'}} titleStyle={{color:'white'}} headerTintColor='#fff'/>
<Scene key="news" hideNavBar={true} title="News" component={NewsScreen} navigationBarStyle={{backgroundColor:'#005696'}} titleStyle={{color:'white'}} headerTintColor='#fff'/>
</Tabs>
</Scene>
</Router>
and I am using
Actions.replace('restaurant',{ mapdata: newArr});
in Map Tab.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:7
Top Results From Across the Web
React Native: There is no route defined for key X Must be one ...
I'm trying to make it so that whenever users click the B tab, the B stack resets, so the user is always served...
Read more >There is no route defined for key navigation.dispatch ... - GitHub
My navigation stack is: App (BottomTabnav) |-HomeTab (Stack navigator) | |-itemList | |-itemDetail |-MyAccountTab (Stack navigator) ...
Read more >[Solved]-There is no route defined for key auths-React Native
Coding example for the question There is no route defined for key auths-React Native.
Read more >Navigate to Different Nested Stacks | by Garry ... - Medium
Have your ever encountered an error “Error: There is no route defined for key”? This happens because we navigate to different Nested Stacks....
Read more >Tutorial: Part 2 – Static POST Handler • Mirage JS
You should see another error: ... POST '/api/reminders', but there was no route defined to handle this request. ... Cannot read property 'id'...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Duplicate of #3258.
Any updates here? Having the same issues with 4.0.6
On further debugging in
navigators/createNavigator.js
this happens after
Actions.replace
adds a new routeStackRouterRoot
is added toroutes
which is not able to find any associated component and hence it breaks.