7
7
* it very often. But take some time to look through and understand
8
8
* what is going on here.
9
9
*
10
- * The app navigation resides in . /app/navigators, so head over there
10
+ * The app navigation resides in app /app/navigators, so head over there
11
11
* if you're interested in adding screens and navigators.
12
12
*/
13
13
if ( __DEV__ ) {
@@ -16,23 +16,27 @@ if (__DEV__) {
16
16
// to only execute this in development.
17
17
require ( "./devtools/ReactotronConfig.ts" )
18
18
}
19
- import ". /i18n"
20
- import ". /utils/ignoreWarnings"
19
+ import "app /i18n"
20
+ import "app /utils/ignoreWarnings"
21
21
import { useFonts } from "expo-font"
22
22
import React from "react"
23
23
import { initialWindowMetrics , SafeAreaProvider } from "react-native-safe-area-context"
24
24
import * as Linking from "expo-linking"
25
- import { useInitialRootStore } from "./models "
26
- import { AppNavigator , useNavigationPersistence } from ". /navigators"
27
- import { ErrorBoundary } from ". /screens/ErrorScreen/ErrorBoundary"
28
- import * as storage from ". /utils/storage"
29
- import { customFontsToLoad } from ". /theme"
30
- import Config from ". /config"
25
+ import { useInitialRootStore } from "app/mobxStateTree "
26
+ import { AppNavigator , useNavigationPersistence } from "app /navigators"
27
+ import { ErrorBoundary } from "app /screens/ErrorScreen/ErrorBoundary"
28
+ import * as storage from "app /utils/storage"
29
+ import { customFontsToLoad } from "app /theme"
30
+ import Config from "app /config"
31
31
import { GestureHandlerRootView } from "react-native-gesture-handler"
32
- import { ViewStyle } from "react-native"
32
+ import { StatusBar , ViewStyle } from "react-native"
33
+ import { store } from "app/redux"
34
+ import { Provider as ReduxProvider } from "react-redux"
33
35
34
36
export const NAVIGATION_PERSISTENCE_KEY = "NAVIGATION_STATE"
35
37
38
+ StatusBar . setBarStyle ( "light-content" )
39
+
36
40
// Web linking configuration
37
41
const prefix = Linking . createURL ( "/" )
38
42
const config = {
@@ -96,21 +100,24 @@ function App(props: AppProps) {
96
100
97
101
// otherwise, we're ready to render the app
98
102
return (
99
- < SafeAreaProvider initialMetrics = { initialWindowMetrics } >
100
- < ErrorBoundary catchErrors = { Config . catchErrors } >
101
- < GestureHandlerRootView style = { $container } >
102
- < AppNavigator
103
- linking = { linking }
104
- initialState = { initialNavigationState }
105
- onStateChange = { onNavigationStateChange }
106
- />
107
- </ GestureHandlerRootView >
108
- </ ErrorBoundary >
109
- </ SafeAreaProvider >
103
+ < ReduxProvider store = { store } >
104
+ < SafeAreaProvider initialMetrics = { initialWindowMetrics } >
105
+ < ErrorBoundary catchErrors = { Config . catchErrors } >
106
+ < GestureHandlerRootView style = { $container } >
107
+ < AppNavigator
108
+ linking = { linking }
109
+ initialState = { initialNavigationState }
110
+ onStateChange = { onNavigationStateChange }
111
+ />
112
+ </ GestureHandlerRootView >
113
+ </ ErrorBoundary >
114
+ </ SafeAreaProvider >
115
+ </ ReduxProvider >
110
116
)
111
117
}
112
118
113
- export default App
119
+ // eslint-disable-next-line reactotron/no-tron-in-production
120
+ export default __DEV__ ? console . tron . overlay ( App ) : App
114
121
115
122
const $container : ViewStyle = {
116
123
flex : 1 ,
0 commit comments