rsnext/test/e2e/app-dir/use-params/app
Florian Lopez Plaza 7ba4a0d53d
FIX [#58788]: Fixed useParams hook undesired re-renders and updated it to use PathParamsContext in the app router. (#60708)
Moved app-dir path params parsing logic from `useParams` to `AppRouter`.
This allows for the use of `PathParamsContext` in the `useParams` hook
for both pages and app routers. In addition, this allows for memoization
of the layout tree which fixes undesired re-renders of the `useParams`
hook.

Fixes [#58788](https://github.com/vercel/next.js/issues/58788)
Closes NEXT-2434

---------

Co-authored-by: Zack Tanner <zacktanner@gmail.com>
2024-02-14 16:52:44 +00:00
..
[...path] Ensure useParams return array for catch-all routes (#52494) 2023-07-10 12:04:44 +00:00
[id] Check for null before reading value in useParams (#47875) 2023-04-05 21:51:52 +00:00
rerenders/[dynamic] FIX [#58788]: Fixed useParams hook undesired re-renders and updated it to use PathParamsContext in the app router. (#60708) 2024-02-14 16:52:44 +00:00
layout.tsx
page.tsx