mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-03-06 17:34:59 +08:00
Fixed typo in HelloHybrid for ios (#151)
* Fixed typo in HelloHybrid for ios * Use state.navState to get routeName in HelloHybrid example for ios
This commit is contained in:
committed by
Eric Vicenti
parent
8bbe951e5b
commit
17522c8b8f
@@ -97,6 +97,7 @@ const HybridContainer = (ReactScreens) => {
|
||||
componentWillUpdate(props, state) {
|
||||
const { name, rootTag } = props;
|
||||
const ScreenView = ReactScreens[name];
|
||||
|
||||
if (!ScreenView) {
|
||||
console.log('Experiencing an error! Fix me!')
|
||||
}
|
||||
@@ -107,7 +108,7 @@ const HybridContainer = (ReactScreens) => {
|
||||
const routeConfig = router && router.getScreenConfig({
|
||||
state: routes[index], dispatch: () => {}
|
||||
}, index, true);
|
||||
title = (routeConfig && routeConfig.title) || route.routeName;
|
||||
title = (routeConfig && routeConfig.title) || state.navState.routeName;
|
||||
}
|
||||
HybridNavigationManager.setTitle(rootTag, title || name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user