Skip to content

Commit a4be33e

Browse files
authored
docs: the as prop is still available in Pages Router (#83864)
We accidentally removed the documentation for `as` prop in Pages Router `next/link`. Closes: https://linear.app/vercel/issue/DOC-3140/add-missing-props-as-to-nextlink-reference-page
1 parent 1a7041a commit a4be33e

File tree

1 file changed

+7
-0
lines changed
  • docs/01-app/03-api-reference/02-components

1 file changed

+7
-0
lines changed

docs/01-app/03-api-reference/02-components/link.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ The following props can be passed to the `<Link>` component:
5858
| Prop | Example | Type | Required |
5959
| --------------------------- | ------------------------ | ----------------- | -------- |
6060
| [`href`](#href-required) | `href="/dashboard"` | String or Object | Yes |
61+
| [`as`](#as) | `as="/post/abc"` | String or Object | - |
6162
| [`replace`](#replace) | `replace={false}` | Boolean | - |
6263
| [`scroll`](#scroll) | `scroll={false}` | Boolean | - |
6364
| [`prefetch`](#prefetch) | `prefetch={false}` | Boolean | - |
@@ -438,6 +439,12 @@ export default function Home() {
438439
}
439440
```
440441

442+
### `as`
443+
444+
Optional decorator for the path that will be shown in the browser URL bar. Before Next.js 9.5.3 this was used for dynamic routes, check our [previous docs](https://github.com/vercel/next.js/blob/v9.5.2/docs/api-reference/next/link.md#dynamic-routes) to see how it worked.
445+
446+
When this path differs from the one provided in `href` the previous `href`/`as` behavior is used as shown in the [previous docs](https://github.com/vercel/next.js/blob/v9.5.2/docs/api-reference/next/link.md#dynamic-routes).
447+
441448
</PagesOnly>
442449

443450
### `onNavigate`

0 commit comments

Comments
 (0)