-
Notifications
You must be signed in to change notification settings - Fork 0
/
thirdscreen.js
44 lines (39 loc) · 1.03 KB
/
thirdscreen.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
import React, {useEffect} from 'react';
import {FlatList, Text, TouchableOpacity, View} from 'react-native';
let indexes = '';
const thirdscreen = (props) => {
const array = [
'item1',
'item2',
'item3',
'item4',
'item5',
'item6',
'item7',
'item8',
];
const filterIndex = () => {
indexes = array.indexOf('item2');
console.log('indexes------->', indexes);
};
useEffect(() => {
filterIndex();
console.log('are we getting any value:', props?.route?.params);
}, []);
return (
<View
style={{
flex: 1,
backgroundColor: 'yellow',
justifyContent: 'center',
alignItems: 'center',
}}>
<Text style={{fontWeight:"bold",fontSize:30}}>third vali screen</Text>
<Text> Name :{props?.route?.params?.name}</Text>
<Text> Age :{props?.route?.params?.age}</Text>
<Text> Occupation :{props?.route?.params?.occupation}</Text>
<Text> Company :{props?.route?.params?.company}</Text>
</View>
);
};
export default thirdscreen;