<Link />
and redirect
navigation causes route handler being called twice
#72909
Labels
bug
Issue was opened via the bug report template.
Navigation
Related to Next.js linking (e.g., <Link>) and navigation.
Link to the code that reproduces this issue
https://codesandbox.io/p/devbox/t66xm6
To Reproduce
next dev
)/
route.js
handlerpage.js
for comparisonCurrent vs. Expected behavior
Current behavior
GET
handler being called twice after one click (route
is logged twice)<Link />
first has
_rsc
query string and the second does notredirect
first has
rsc: 1
in HTTP header and the second does notExpected behavior
GET
route handler should be called only once (similar to current behavior ofpage.js
) since it's not a React component and there's no need to prefetchProvide environment information
Which area(s) are affected? (Select all that apply)
Navigation
Which stage(s) are affected? (Select all that apply)
next dev (local), next start (local)
Additional context
Might relate to #57257 but that one is about
page.js
instead ofroute.js
handlerI've tested with v14.2.0-canary.48 where that issue is resolved, and the behavior makes no difference to the latest canary version
The text was updated successfully, but these errors were encountered: