Fetch data using URL parameter. Create app/[id]/page.tsx, await params to get ID, fetch API, render. Server Component (no 'use client').
Dynamic route folder: app/[id]/page.tsx → URL segment accessible as params
// app/[id]/page.tsx
export default async function ProductPage({
params,
}: {
params: Promise<{ id: string }>;
}) {
const { id } = await params; // Next.js 15+: await params
const product = await fetch(`https://api.example.com/products/${id}`)
.then(r => r.json());
return <div><h1>{product.name}</h1></div>;
}
app/[id]/ unless explicitly told otherwise