rsnext/test/e2e/app-dir/navigation
Zack Tanner c116da32de
fix double redirect when using a loading boundary (#63786)
### What & Why
When an RSC triggers `navigate` after the shell has already been sent to
the client, a meta tag is inserted to signal to the browser it needs to
perform an MPA navigation. This is primarily used for bot user agents,
since we wouldn't have been able to provide a proper redirect status
code (since it occurred after the initial response was sent).

However, the router would trigger a SPA navigation, while the `<meta>`
tag lagged to perform an MPA navigation, resulting in 2 navigations to
the same URL.

### How
When the client side code attempts to handle the redirect, we treat it
like an MPA navigation. This will suspend in render and trigger a
`location.push`/`location.replace` to the targeted URL. As a result,
only one of these navigation events will win.

Fixes #59800
Fixes #62463

Closes NEXT-2952
Closes NEXT-2719
2024-03-28 16:08:39 -07:00
..
app fix double redirect when using a loading boundary (#63786) 2024-03-28 16:08:39 -07:00
pages memoize useParams (#56771) 2023-10-13 07:47:05 +00:00
middleware.js Export RedirectType from next/navigation (#54729) 2023-08-29 11:05:44 -07:00
navigation.test.ts fix double redirect when using a loading boundary (#63786) 2024-03-28 16:08:39 -07:00
next.config.js Remove experimental config from create-next-app (#49241) 2023-05-05 00:22:28 -07:00