Skip to main content

useParams

Get params which is defined while navigating

app/detail/[id].tsx
import React from 'react';
import {Button, Text, View} from 'react-native';
import {useParams} from 'react-native-auto-route';

export default function Detail() {
const params = useParams();
return (
<View>
<Text>Detail: {params.id}</Text>
</View>
);
}