rsnext/test/e2e/app-dir/navigation
Zack Tanner a19b3bc6fb
fix navigation issue when dynamic param casing changes (#61726)
### What
When navigating to a page with dynamic params using a certain casing,
and then following a link to another page using _different_ casing for
the same param, the router would get stuck in an infinite suspense
cycle.

### Why
On the client we normalize cache keys by lowercasing the values for
dynamic segments. However the RSC data for each segment wouldn't have
this same casing logic applied. This is causing the router to not
recognize that there is already RSC data available for that segment,
resulting in an infinite suspense cycle.

### How
The `toLowerCase()` logic shouldn't be needed here. Technically we could
leave this in place and update `matchSegment` to also apply the
lowercase logic, but currently there are too many utility functions that
parse segments to comfortably make that change. I confirmed that the bug
related to why we lowercased these router cache keys is no longer
present after making this change.

Fixes #61722
Closes NEXT-2377
2024-02-06 08:59:18 -08:00
..
app fix navigation issue when dynamic param casing changes (#61726) 2024-02-06 08:59:18 -08: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 navigation issue when dynamic param casing changes (#61726) 2024-02-06 08:59:18 -08:00
next.config.js Remove experimental config from create-next-app (#49241) 2023-05-05 00:22:28 -07:00