diff --git a/Examples/UIExplorer/js/UIExplorerApp.android.js b/Examples/UIExplorer/js/UIExplorerApp.android.js index d2331402a..7d1b9aecd 100644 --- a/Examples/UIExplorer/js/UIExplorerApp.android.js +++ b/Examples/UIExplorer/js/UIExplorerApp.android.js @@ -50,8 +50,8 @@ type Props = { exampleFromAppetizeParams: string, }; -type State = { - initialExampleUri: ?string, +type State = UIExplorerNavigationState & { + externalExample: ?string, }; class UIExplorerApp extends React.Component { @@ -185,8 +185,10 @@ class UIExplorerApp extends React.Component { this.drawer && this.drawer.closeDrawer(); const newState = UIExplorerNavigationReducer(this.state, action); if (this.state !== newState) { - this.setState(newState); - AsyncStorage.setItem('UIExplorerAppState', JSON.stringify(this.state)); + this.setState( + newState, + () => AsyncStorage.setItem('UIExplorerAppState', JSON.stringify(this.state)) + ); return true; } return false;