vercel / next.js

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

Framer Motion exit/initial animations fail on Partial Prerendering #63785

Open LawJolla opened 3 months ago

LawJolla commented 3 months ago

Link to the code that reproduces this issue

Codesandbox

To Reproduce

  1. Start the dev server
  2. Go to / route
  3. Click "next" button on page multiple times

Current vs. Expected behavior

Expect the exit and initial animations to work. It works properly if partial prerendering is turned off or in the pages directory. (see /noPPR)

Should work as in /noPPR

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Sun Aug  6 20:05:33 UTC 2023
  Available memory (MB): 4102
  Available CPU cores: 2
Binaries:
  Node: 20.11.1
  npm: 10.2.4
  Yarn: 1.22.19
  pnpm: 8.15.4
Relevant Packages:
  next: 14.2.0-canary.45 // Latest available version is detected (14.2.0-canary.45).
  eslint-config-next: 14.1.4
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.3.3
Next.js Config:
  output: N/A

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

App Router

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

next dev (local)

Additional context

No response

godavdev commented 3 months ago

Having this problem too, I guess we'll have to stay with next.js 14 for a while