rsnext/test/e2e/app-dir/actions-navigation
Zack Tanner da842e167a
fix loading issue when navigating to page with async metadata (#61687)
### What
Client-side transitioning to a page that triggered a loading boundary
with async metadata would cause the transition to stall, potentially
getting stuck in a refetch loop.

### Why
In layout-router, we trigger a "lazy fetch" when we encounter a segment
that we don't have cache nodes for. This calls out to the server and
suspends until the data fetch is resolved, and applied to the router
tree. However after suspending but before updating the client router, we
set `childNode.lazyData` to null. When we unsuspend from the server
patch action, `childNode.rsc` might still be missing and clearing
`lazyData` means we've blown away the reference to the fetch we already
had pending, triggering a refetch loop.

### How
This removes the logic that mutates the cache node in render, as this is
not concurrent safe, and doesn't appear to be needed for anything.

Fixes #61117
Closes NEXT-2361

---------

Co-authored-by: Jiachi Liu <inbox@huozhi.im>
2024-02-06 07:10:53 -08:00
..
app fix loading issue when navigating to page with async metadata (#61687) 2024-02-06 07:10:53 -08:00
index.test.ts fix bugs pertaining to server actions + navigation (#55853) 2023-09-23 01:42:39 +00:00
middleware.js fix bugs pertaining to server actions + navigation (#55853) 2023-09-23 01:42:39 +00:00
next.config.js Remove the experimental serverActions flag (#57145) 2023-10-20 20:45:25 +00:00