react native use route params
import * as React from 'react';
import { Text } from 'react-native';
import { useRoute } from '@react-navigation/native';
function MyText() {
const route = useRoute();
return <Text>{route.params.caption}</Text>;
}