Files
Tim NeutkensandGitHub 73e2979cb8 Ensure useParams return array for catch-all routes (#52494)
## What?

Ensures `useParams` matches `params` passed to the page, also matches the docs.

Fixes #50856
Fixes NEXT-1419
2023-07-10 12:04:44 +00:00

14 lines
261 B
TypeScript

'use client'
import { useParams } from 'next/navigation'
export default function Page() {
const params = useParams()
if (params === null) {
return null
}
return (
<div>
<div id="params">{JSON.stringify(params.path)}</div>
</div>
)
}