route
<Route
path="invoices/:invoiceId"
element={<Invoice />}
/>
page
function Invoice() {
const { invoiceId } = useParams();
const invoice = fetchBlaBla(`/api/invoices/${invoiceId}`);
...
}
<Route
path="invoices/:invoiceId"
element={<Invoice />}
/>
function Invoice() {
const { invoiceId } = useParams();
const invoice = fetchBlaBla(`/api/invoices/${invoiceId}`);
...
}