Navigator.NavigationBar - cannot set property '_key' of undefined
See original GitHub issue
“react-native”: “0.32.0”,
tested with the example code still getting this error ?
test code
class App extends Component {
render() {
const routes = [
{title: 'First Scene', index: 0},
{title: 'Second Scene', index: 1},
];
return (
<Navigator
initialRoute={routes[0]}
initialRouteStack={routes}
renderScene={(route, navigator) =>
<TouchableHighlight onPress={() => {
if (route.index === 0) {
navigator.push(routes[1]);
} else {
navigator.pop();
}
}}>
<Text>Hello {route.title}!</Text>
</TouchableHighlight>
}
style={{padding: 100}}
navigationBar={
<Navigator.NavigationBar
routeMapper={{
LeftButton: (route, navigator, index, navState) =>
{ return (<Text>Cancel</Text>); },
RightButton: (route, navigator, index, navState) =>
{ return (<Text>Done</Text>); },
Title: (route, navigator, index, navState) =>
{ return (<Text>Awesome Nav Bar</Text>); },
}}
style={{backgroundColor: 'gray'}}
/>
}
/>
);
}
}
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Cannot read property of 'navigate' of undefined - Stack Overflow
This is happening because the navigation prop is passed to the Berita component and you are destructuring the property in Item component not ......
Read more >Native Stack Navigator | React Navigation
Native Stack Navigator provides a way for your app to transition between screens where each new screen is placed on top of a...
Read more >BottomNavigationBar class - material library - Dart API
A material widget that's displayed at the bottom of an app for selecting among a small number of views, typically between three and...
Read more >Personalize the Navigation Bar in Lightning Experience
You can't rename or remove items that your admin has specified for the app. Review your changes to the nav bar. To make...
Read more >cannot read properties of undefined navigate - You.com
Cannot read property 'navigate' of Undefined in React Navigation ... First I created Home Screen which has four buttons One with name Upsc...
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 Free
Top 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
I have a similar error.
undefined is not and object (evaluating '_this._key = guid()')
in NavigatorNavigationsBar.js:114 after upgrading to 0.32.Building with Xcode 8 for iOS 10 - not sure if related.
I still have the same issue using RN 0.35.0