-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
67 lines (57 loc) · 1.99 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import React from "react";
/*리덕스 */
import createSagaMiddleware from "redux-saga";
import logger from "redux-logger";
import { composeWithDevTools } from "redux-devtools-extension";
import { applyMiddleware, createStore } from "redux";
import { Provider } from "react-redux";
import rootReducer, { rootSaga } from "./src/modules";
/*네비게이션 */
import { StatusBar } from "expo-status-bar";
import { SafeAreaProvider, SafeAreaView } from "react-native-safe-area-context";
import palette from "./src/lib/styles/palette";
/* Sentry */
import * as Sentry from "sentry-expo";
import { REACT_APP_SENTRY_DSN } from "@env";
Sentry.init({
dsn: REACT_APP_SENTRY_DSN,
enableInExpoDevelopment: false,
});
/* app loading */
import AppInit from "./AppInit";
/* logbox */
import { LogBox, Platform } from "react-native";
if (Platform.OS !== "web") {
LogBox.ignoreLogs([
"ReactNativeFiberHostComponent: Calling getNode() on the ref of an Animated component is no longer necessary. You can now directly use the ref instead. This method will be removed in a future release.",
"%s: Calling %s on the ref of an Animated component is no longer necessary. You can now directly use the ref instead. This method will be removed in a future release.",
]);
}
/*리덕스 */
const sagaMiddleware = createSagaMiddleware();
const store = __DEV__
? createStore(
rootReducer,
composeWithDevTools(applyMiddleware(sagaMiddleware, logger))
)
: createStore(rootReducer, applyMiddleware(sagaMiddleware));
sagaMiddleware.run(rootSaga);
/* 앱 함수 */
export default function App() {
return (
<SafeAreaProvider>
<StatusBar />
<SafeAreaView
style={{
flex: 1,
alignItems: "center",
justifyContent: "center",
backgroundColor: palette.softGray,
}}>
<Provider store={store}>
<AppInit />
</Provider>
</SafeAreaView>
</SafeAreaProvider>
);
}