-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathApp.js
More file actions
27 lines (24 loc) · 793 Bytes
/
App.js
File metadata and controls
27 lines (24 loc) · 793 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
import {View, Text} from 'react-native';
import React, {useEffect, useReducer} from 'react';
import Router from './src/router';
import CombineReducers from './src/store/combineReducers';
import {initialState, reducers} from './src/store/reducer';
import remoteConfig from '@react-native-firebase/remote-config';
import {ReducerContext} from './src/store';
const App = () => {
const [store, dispatch] = useReducer(CombineReducers(reducers), initialState);
useEffect(() => {
setRemoteConfig();
}, []);
const setRemoteConfig = async () => {
await remoteConfig().setConfigSettings({
minimumFetchIntervalMillis: 100,
});
};
return (
<ReducerContext.Provider value={{store, dispatch}}>
<Router />
</ReducerContext.Provider>
);
};
export default App;