rsnext/test/e2e/app-dir/params-hooks-compat
Jiachi Liu ff3668499a
Make useSearchParams and useParams compatible between app and pages router (#55280)
### `useSearchParams`

server router's query includes both search params and path params, this PR eliminate the path params from `useSearchParams` to make it aligned between app router and pages router

### `useParams`

For pages, we extract the params keys with `getRouteRegex`, and pick them out from `router.query`

Fixes #54242 
Closes NEXT-1536
2023-09-18 12:42:20 +00:00
..
app Make useSearchParams and useParams compatible between app and pages router (#55280) 2023-09-18 12:42:20 +00:00
pages/pages Make useSearchParams and useParams compatible between app and pages router (#55280) 2023-09-18 12:42:20 +00:00
shared Make useSearchParams and useParams compatible between app and pages router (#55280) 2023-09-18 12:42:20 +00:00
index.test.ts Make useSearchParams and useParams compatible between app and pages router (#55280) 2023-09-18 12:42:20 +00:00