You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
navigate to http://localhost:3000/home/nested directly to experience the infinite refresh right away.
Timestamp will update on each render.
Server logs from the middleware will populate on each reload
alternatively, navigate to http://localhost:3000/home/ and then click on the hard navigation and/or the next link for http://localhost:3000/home/nested
hard navigation link refreshes infinitely
next link behaves as expected and does not refresh infinitely
During local development in next dev, a nested page inside of a parallel route without a corresponding matched route inside another parallel route causes an infinite reload, despite the required default file meant to render as a fallback.
### What?
HMR causes infinite reloads for parallel routes when the corresponding page component is nested
### Why?
In 4900fa2, code was added to remove `/@children` from the page path (if present) but in 59b3634, `normalizeParallelKey` removes the @ prefix from children, so this doesn't seem to be catching the scenario it was intended to prevent
### How?
This updates the existing replace logic to consider `/children/page` rather than `/@children/page` -- it doesn't seem like `/@children` is a valid scenario given the `normalizeParallelKey` behavior
Fixes#52342 and addresses the concerns in #52061 (comment)
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:23 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6020 Binaries: Node: 18.16.0 npm: 9.5.1 Yarn: N/A pnpm: 8.6.5 Relevant Packages: next: 13.4.9-canary.2 eslint-config-next: 13.4.8 react: 18.2.0 react-dom: 18.2.0 typescript: 5.1.6 Next.js Config: output: N/A
Which area(s) of Next.js are affected? (leave empty if unsure)
App Router
Link to the code that reproduces this issue or a replay of the bug
https://github.com/tnoor-co/next-infinite-parallel-refresh
To Reproduce
pnpm install
pnpm dev
http://localhost:3000/home/nested
directly to experience the infinite refresh right away.http://localhost:3000/home/
and then click on the hard navigation and/or the next link forhttp://localhost:3000/home/nested
Reproduced with
next@13.4.9-canary.2
Describe the Bug
During local development in
next dev
, a nested page inside of a parallel route without a corresponding matched route inside another parallel route causes an infinite reload, despite the required default file meant to render as a fallback.ref:
#52061
#51951 (comment)
Expected Behavior
The page should only reload if changes were made to it or if the page returns a 404.
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
The text was updated successfully, but these errors were encountered: