vercel / next.js

The React Framework
https://nextjs.org
MIT License
122.19k stars 26.16k forks source link

chore: Make use of Suspense conditional #65766

Open snehakhobragade90 opened 1 month ago

snehakhobragade90 commented 1 month ago

Fixing a bug

What?

Extra Suspense boundary flashes the loading state for the next/dynamic components. For SSR, it shouldn't render loading by default. This was earlier fixed in the PR but reverted later as removing this led of the server side errors to bubble up leading the pages to crash.

This draft proposes to add this Suspense conditionally. The consumers can add a suspense within their client if they want to avoid the server-side errors to bubble up instead of the framework doing it mandatorily.

Fixes https://github.com/vercel/next.js/issues/64060 https://github.com/vercel/next.js/issues/64687

ijjk commented 1 month ago

Allow CI Workflow Run

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

ijjk commented 1 month ago

Allow CI Workflow Run

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer