-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
37 lines (34 loc) · 891 Bytes
/
App.js
File metadata and controls
37 lines (34 loc) · 891 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
import React, { useRef,useEffect } from 'react';
import { NavigationContainer } from '@react-navigation/native';
import MyStacks from './components/MyStacks';
import AsyncStorage from '@react-native-async-storage/async-storage';
export default function App() {
let email='';
let type='';
function setData(memail,mtype){
email=memail;
type=mtype;
}
useEffect(() => {
const fetchData = async () => {
const memail = await AsyncStorage.getItem('email').then( (value) =>{
return value;
});
const mtype= await AsyncStorage.getItem('type').then( (value) => {
return value;
});
setData(memail,mtype);
}
fetchData();
}, []);
return (
< >
<NavigationContainer>
<MyStacks
email={email}
type={type}
/>
</NavigationContainer>
</>
);
}