mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
27 lines
720 B
React
27 lines
720 B
React
import { Suspense, unstable_postpone as postpone } from 'react'
|
|
import { Optimistic } from '../../../components/optimistic'
|
|
import { ServerHtml } from '../../../components/server-html'
|
|
|
|
export default (props) => {
|
|
return (
|
|
<>
|
|
<ServerHtml />
|
|
<Suspense fallback="loading...">
|
|
<Optimistic searchParams={props.searchParams} />
|
|
</Suspense>
|
|
<Suspense fallback="loading...">
|
|
<IncidentalPostpone />
|
|
</Suspense>
|
|
</>
|
|
)
|
|
}
|
|
|
|
function IncidentalPostpone() {
|
|
// This component will postpone but is not using
|
|
// any dynamic APIs so we expect it to simply client render
|
|
if (typeof window === 'undefined') {
|
|
postpone('incidentally')
|
|
}
|
|
return <div>Incidental</div>
|
|
}
|