You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Docs: Make "With URL Obeject" only displayed in Pages docs (#65547)
App router [does not
support](https://nextjs.org/docs/messages/app-dir-dynamic-href) dynamic
hrefs: removing it from the app router docs, and only having it in the
pages router docs.
Fixes#65505
---------
Co-authored-by: samcx <sam@vercel.com>
Copy file name to clipboardExpand all lines: docs/02-app/02-api-reference/01-components/link.mdx
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -393,6 +393,8 @@ function Home() {
393
393
exportdefaultHome
394
394
```
395
395
396
+
<PagesOnly>
397
+
396
398
### With URL Object
397
399
398
400
`Link` can also receive a URL object and it will automatically format it to create the URL string. Here's how to do it:
@@ -437,6 +439,8 @@ The above example has a link to:
437
439
438
440
You can use every property as defined in the [Node.js URL module documentation](https://nodejs.org/api/url.html#url_url_strings_and_url_objects).
439
441
442
+
</PagesOnly>
443
+
440
444
### Replace the URL instead of push
441
445
442
446
The default behavior of the `Link` component is to `push` a new URL into the `history` stack. You can use the `replace` prop to prevent adding a new entry, as in the following example:
0 commit comments