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:
Alejandro Garcia
2017-02-02 17:41:15 +01:00
committed by Eric Vicenti
parent 8bbe951e5b
commit 17522c8b8f

View File

@@ -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);
}