mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
`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]>
23 lines
521 B
JavaScript
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>
|
|
)
|
|
}
|