-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
38 lines (32 loc) · 985 Bytes
/
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
import React, {useRef, useState, useEffect} from 'react';
import {
StyleSheet,
View,
Text,
Image,
ImageBackground,
AppState,
} from 'react-native';
import Navigation from './Navigation';
export default function App() {
// const appState = useRef(AppState.currentState);
// const [appStateVisible, setAppStateVisible] = useState(appState.current);
// useEffect(() => {
// AppState.addEventListener('change', handleAppStateChange);
// return () => {
// AppState.removeEventListener('change', handleAppStateChange);
// };
// }, []);
// const handleAppStateChange = nextAppState => {
// if (
// appState.current.match(/inactive|background/) &&
// nextAppState === 'active'
// ) {
// console.log('ADmin has come to the foreground!');
// }
// appState.current = nextAppState;
// setAppStateVisible(appState.current);
// console.log('ADmin State: ', appState.current);
// };
return <Navigation />;
}