Fix UI Explorer in Android.

Summary:
The refactor work (renamed `navigationState.children` to `navigationState.routes`) from D3333735
broken UI Explorer in Android. Fix it.

Reviewed By: ericvicenti

Differential Revision: D3334014

fbshipit-source-id: 345fbb5eabc792a49c6f2f82ce8c03679bc75940
This commit is contained in:
Hedger Wang 2016-05-23 10:48:35 -07:00 committed by Facebook Github Bot 0
parent 68af89dcbf
commit 0b72eba869
2 changed files with 6 additions and 6 deletions

View File

@ -59,7 +59,7 @@ const NavigationBasicExample = React.createClass({
return (
<ScrollView style={styles.topView}>
<NavigationExampleRow
text={`Current page: ${this.state.croutes[this.state.index].key}`}
text={`Current page: ${this.state.routes[this.state.index].key}`}
/>
<NavigationExampleRow
text={`Push page #${this.state.routes.length}`}

View File

@ -137,11 +137,11 @@ class UIExplorerApp extends React.Component {
/>
);
}
const title = UIExplorerStateTitleMap(stack.children[stack.index]);
const index = stack.children.length <= 1 ? 1 : stack.index;
const title = UIExplorerStateTitleMap(stack.routes[stack.index]);
const index = stack.routes.length <= 1 ? 1 : stack.index;
if (stack && stack.children[index]) {
const {key} = stack.children[index];
if (stack && stack.routes[index]) {
const {key} = stack.routes[index];
const ExampleModule = UIExplorerList.Modules[key];
const ExampleComponent = UIExplorerExampleList.makeRenderable(ExampleModule);
return (
@ -171,7 +171,7 @@ class UIExplorerApp extends React.Component {
<UIExplorerExampleList
onNavigate={this._handleAction}
list={UIExplorerList}
{...stack.children[0]}
{...stack.routes[0]}
/>
</View>
);