9
9
* The app navigation resides in ./app/navigators, so head over there
10
10
* if you're interested in adding screens and navigators.
11
11
*/
12
- import "./i18n"
13
- import "./utils/ignore-warnings"
14
- import React , { useState , useEffect , useRef } from "react"
15
- import { NavigationContainerRef } from "@react-navigation/native"
16
- import { SafeAreaProvider , initialWindowMetrics } from "react-native-safe-area-context"
17
- import { initFonts } from "./theme/fonts" // expo
18
- import * as storage from "./utils/storage"
12
+ import './i18n'
13
+ import './utils/ignore-warnings'
14
+ import React , { useState , useEffect , useRef } from 'react'
15
+ import { NavigationContainerRef } from '@react-navigation/native'
16
+ import {
17
+ SafeAreaProvider ,
18
+ initialWindowMetrics ,
19
+ } from 'react-native-safe-area-context'
20
+ import { initFonts } from './theme/fonts' // expo
21
+ import * as storage from './utils/storage'
19
22
import {
20
23
useBackButtonHandler ,
21
24
RootNavigator ,
22
25
canExit ,
23
26
setRootNavigation ,
24
27
useNavigationPersistence ,
25
- } from " ./navigators"
26
- import { RootStore , RootStoreProvider , setupRootStore } from " ./models"
27
- import { ToggleStorybook } from " ../storybook/toggle-storybook"
28
+ } from ' ./navigators'
29
+ import { RootStore , RootStoreProvider , setupRootStore } from ' ./models'
30
+ import { ToggleStorybook } from ' ../storybook/toggle-storybook'
28
31
29
32
// This puts screens in a native ViewController or Activity. If you want fully native
30
33
// stack navigation, use `createNativeStackNavigator` in place of `createStackNavigator`:
31
34
// https://github.com/kmagiera/react-native-screens#using-native-stack-navigator
32
- import { enableScreens } from " react-native-screens"
35
+ import { enableScreens } from ' react-native-screens'
33
36
enableScreens ( )
34
37
35
- export const NAVIGATION_PERSISTENCE_KEY = " NAVIGATION_STATE"
38
+ export const NAVIGATION_PERSISTENCE_KEY = ' NAVIGATION_STATE'
36
39
37
40
/**
38
41
* This is the root component of our app.
@@ -43,10 +46,10 @@ function App() {
43
46
44
47
setRootNavigation ( navigationRef )
45
48
useBackButtonHandler ( navigationRef , canExit )
46
- const { initialNavigationState , onNavigationStateChange } = useNavigationPersistence (
47
- storage ,
48
- NAVIGATION_PERSISTENCE_KEY ,
49
- )
49
+ const {
50
+ initialNavigationState ,
51
+ onNavigationStateChange ,
52
+ } = useNavigationPersistence ( storage , NAVIGATION_PERSISTENCE_KEY )
50
53
51
54
// Kick off initial async loading actions, like loading fonts and RootStore
52
55
useEffect ( ( ) => {
0 commit comments