Files
02c2f11ec9 Enable missing suspense bailout by default (#60840)
`experimental.missingSuspenseWithCSRBailout` should be enabled by
default to help users to disciver unwrapped suspense boundaries.

Add more notes in the error doc about deprecation and temporary
workaround to disable it.

Closes NEXT-2157

---------

Co-authored-by: JJ Kasper <[email protected]>
2024-01-18 21:11:22 +01:00

23 lines
521 B
JavaScript

import { useParams, useSearchParams } from 'next/navigation'
export function ParamsComponent() {
const params = useParams()
const searchParams = useSearchParams()
return (
<div>
<h2>useParams()</h2>
<pre id="use-params">{JSON.stringify(params, null, 2)}</pre>
<h2>useSearchParams()</h2>
<pre id="use-search-params">
{JSON.stringify(
Object.fromEntries(searchParams ? searchParams.entries() : []),
null,
2
)}
</pre>
</div>
)
}