Unverified Commit cdaf837f authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Update asPath to mention basePath/locale stripping (#18807)

Tweak `asPath` docs to mention `basePath` and `locale` will not be included in the value. 

Closes: https://github.com/vercel/next.js/issues/18782
parent 5e9d1aae
...@@ -43,7 +43,7 @@ The following is the definition of the `router` object returned by both [`useRou ...@@ -43,7 +43,7 @@ The following is the definition of the `router` object returned by both [`useRou
- `pathname`: `String` - Current route. That is the path of the page in `/pages` - `pathname`: `String` - Current route. That is the path of the page in `/pages`
- `query`: `Object` - The query string parsed to an object. It will be an empty object during prerendering if the page doesn't have [data fetching requirements](/docs/basic-features/data-fetching.md). Defaults to `{}` - `query`: `Object` - The query string parsed to an object. It will be an empty object during prerendering if the page doesn't have [data fetching requirements](/docs/basic-features/data-fetching.md). Defaults to `{}`
- `asPath`: `String` - Actual path (including the query) shown in the browser. - `asPath`: `String` - The path (including the query) shown in the browser without the configured `basePath` or `locale`.
- `isFallback`: `boolean` - Whether the current page is in [fallback mode](/docs/basic-features/data-fetching#fallback-pages). - `isFallback`: `boolean` - Whether the current page is in [fallback mode](/docs/basic-features/data-fetching#fallback-pages).
- `basePath`: `String` - The active [basePath](/docs/api-reference/next.config.js/basepath) (if enabled). - `basePath`: `String` - The active [basePath](/docs/api-reference/next.config.js/basepath) (if enabled).
- `locale`: `String` - The active locale (if enabled). - `locale`: `String` - The active locale (if enabled).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment