-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathApp.js
More file actions
38 lines (33 loc) · 947 Bytes
/
App.js
File metadata and controls
38 lines (33 loc) · 947 Bytes
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
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow
*/
import React, { Component } from 'react';
import codePush from 'react-native-code-push';
import SplashScreen from 'react-native-splash-screen';
import createStore from './src/store/createStore';
import Setup from './src/Setup';
import { checkFcmPermission } from './src/constants/firebaseFunc';
class App extends Component {
componentDidMount() {
SplashScreen.hide();
checkFcmPermission();
codePush.sync({
installMode: codePush.InstallMode.IMMEDIATE,
});
}
render() {
const initialState = window.__INITIAL_STATE__;
const store = createStore(initialState);
return <Setup store={store} />;
}
}
let codePushOption = {
checkFrequency: codePush.CheckFrequency.ON_APP_START,
installMode: codePush.InstallMode.IMMEDIATE,
};
export default (App = codePush(codePushOption)(App));
// export default App;