Streaming SSR Next js 12

Viewed 36

Currently i am looking for nextjs streaming ssr feature . Let me explain a bit

export default function Home() {
  
  return (
     <div>
      <Header />
      <Suspense fallback={<Spinner />}>
        <SomeHeavyComponent  />
      </Suspense>
    <Footer/>
    </div>
  );
}
export const getServerSideProps = async ({ res }) => {
//some datafetching
}

SomeHeavyComponent contains some other suspense inside it and it will resolve all suspense boundaries as soon as data is resolved.

I have checked different solution on github but unable to find some releastic example in while we have method of getServersideProps and some part of page is streamed using ssr streaming . I have also checked Vercel code but this code contains server components.

Documentation didn't help as there is no detailed information . I am confused related to usage of dynamic import with suspense and suspense with streaming ssr .

Kindly explain how we can use suspense in SSR , its usage with dynamic import , i also go through this but still i am confused

0 Answers
Related