Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DynamicIO]PPR pages are rendered every time #76072

Open
AkifumiSato opened this issue Feb 15, 2025 · 0 comments
Open

[DynamicIO]PPR pages are rendered every time #76072

AkifumiSato opened this issue Feb 15, 2025 · 0 comments
Labels
dynamicIO Related to dynamicIO. Partial Prerendering (PPR) Related to Partial Prerendering.

Comments

@AkifumiSato
Copy link
Contributor

AkifumiSato commented Feb 15, 2025

Link to the code that reproduces this issue

https://github.com/AkifumiSato/nextjs-dynamicio-and-ppr-issue-demo

To Reproduce

next build and next start in the reproduction repository.

// app/page.tsx
export default async function Page() {
  console.log("render: Page")

  return (
    <div>
      ...
      <Suspense fallback={<>loading...</>}>
        <Products />
      </Suspense>
    </div>
  );
}

async function Products() {
  console.log("render: Products Components")

  // ...
}

Build log

Route (app)                              Size     First Load JS
┌ ◐ /                                    3.51 kB         118 kB
...

◐  (Partial Prerender)  prerendered as static HTML with dynamic server-streamed content

Request log /(every time)

render: Page
render: Products Components

Current vs. Expected behavior

When a request comes in for a PPR page, we expect only the Dynamic Hole to be rendered. In reality, however, the entire page is rendered. This means that PPR will not work as intended when Next.js is employed for self-hosting.

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.4.0: Wed Feb 21 21:44:43 PST 2024; root:xnu-10063.101.15~2/RELEASE_ARM64_T6000
  Available memory (MB): 32768
  Available CPU cores: 8
Binaries:
  Node: 20.10.0
  npm: 10.2.3
  Yarn: N/A
  pnpm: 9.6.0
Relevant Packages:
  next: 15.2.0-canary.60 // There is a newer canary version (15.2.0-canary.61) available, please upgrade! 
  eslint-config-next: N/A
  react: 19.0.0
  react-dom: 19.0.0
  typescript: 5.7.3
Next.js Config:
  output: N/A
 ⚠ There is a newer canary version (15.2.0-canary.61) available, please upgrade! 
   Please try the latest canary version (`npm install next@canary`) to confirm the issue still exists before creating a new issue.
   Read more - https://nextjs.org/docs/messages/opening-an-issue

Which area(s) are affected? (Select all that apply)

dynamicIO, Partial Prerendering (PPR)

Which stage(s) are affected? (Select all that apply)

next start (local)

Additional context

No response

@github-actions github-actions bot added dynamicIO Related to dynamicIO. Partial Prerendering (PPR) Related to Partial Prerendering. labels Feb 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dynamicIO Related to dynamicIO. Partial Prerendering (PPR) Related to Partial Prerendering.
Projects
None yet
Development

No branches or pull requests

1 participant