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
* Using developit/unfetch as the Fetch API polyfill
* Added the replace prop into the Link component
* Added integration test for replace prop on Link component
Copy file name to clipboardExpand all lines: readme.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -292,6 +292,16 @@ export default () => (
292
292
293
293
That will generate the URL string `/about?name=Zeit`, 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).
294
294
295
+
The default behaviour for the `<Link>` component is to `push` a new url into the stack. You can use the `replace` prop to prevent adding a new entry.
296
+
297
+
```jsx
298
+
// pages/index.js
299
+
importLinkfrom'next/link'
300
+
exportdefault () => (
301
+
<div>Click <Link href='/about' replace><a>here</a></Link> to read more</div>
0 commit comments