1import * as React from 'react';
2import { Text } from 'react-native';
3import { useRoute } from '@react-navigation/native';
4
5function MyText() {
6 const route = useRoute();
7
8 return <Text>{route.params.caption}</Text>;
9}
1navigation.navigate('RouteName', { /* params go here */ })
2
3to recieve the params
4
5function DetailsScreen({ route, navigation }) {
6 const { itemId, otherParam } = route.params;
7 return(<Text>itemId<Text>);
8}