a38e144099
## Description According to `Next.js` useRouter documentation: - `asPath`: The path (including the query) shown in the browser without the configured basePath or locale. - `pathname`: Current route. That is the path of the page in /pages, the configured basePath or locale is not included. `asPath` should not be used as the props of components. There are many cases that `asPath` not working as expected. For example: - `asPath` is different on server-side and client-side. - `asPath` can contains `id` and `query`. ## Suggestion - Warning the use of `asPath` can lead to the conflict of client and server-side. - Update `useRouter` document. ## Bug - [x] Related issues linked using `fixes #number` Fixes: https://github.com/vercel/next.js/issues/34144 Fixes: https://github.com/vercel/next.js/issues/34016 Fixes: https://github.com/vercel/next.js/issues/34197 |
||
---|---|---|
.. | ||
ActiveLink.js | ||
Nav.js |