7ba4a0d53d
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> |
||
---|---|---|
.. | ||
app | ||
pages/pages-dir/[dynamic] | ||
next.config.js | ||
tsconfig.json | ||
use-params.test.ts |