File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,8 @@ type State = UIExplorerNavigationState & {
6060 externalExample ?: string ,
6161} ;
6262
63+ const APP_STATE_KEY = 'UIExplorerAppState.v1' ;
64+
6365class UIExplorerApp extends React . Component {
6466 _renderOverlay : Function ;
6567 _renderScene : Function ;
@@ -81,7 +83,7 @@ class UIExplorerApp extends React.Component {
8183
8284 componentDidMount ( ) {
8385 Linking . getInitialURL ( ) . then ( ( url ) => {
84- AsyncStorage . getItem ( 'UIExplorerAppState' , ( err , storedString ) => {
86+ AsyncStorage . getItem ( APP_STATE_KEY , ( err , storedString ) => {
8587 const exampleAction = URIActionMap ( this . props . exampleFromAppetizeParams ) ;
8688 const urlAction = URIActionMap ( url ) ;
8789 const launchAction = exampleAction || urlAction ;
@@ -111,7 +113,7 @@ class UIExplorerApp extends React.Component {
111113 const newState = UIExplorerNavigationReducer ( this . state , action ) ;
112114 if ( this . state !== newState ) {
113115 this . setState ( newState ) ;
114- AsyncStorage . setItem ( 'UIExplorerAppState' , JSON . stringify ( this . state ) ) ;
116+ AsyncStorage . setItem ( APP_STATE_KEY , JSON . stringify ( this . state ) ) ;
115117 }
116118 }
117119
You can’t perform that action at this time.
0 commit comments