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:
parent
68af89dcbf
commit
0b72eba869
|
@ -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}`}
|
||||
|
|
|
@ -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>
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue