next.js/test/e2e/app-dir/ppr-full/app/dynamic-data/incidental-postpone/page.jsx
page.jsx27 lines720 B
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>
}
Quest for Codev2.0.0
/
SIGN IN