From 12e8b1265d39ca83b2b1c42acaf66693de12bc75 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Tue, 27 Jun 2017 07:02:30 +0200 Subject: [PATCH] Document usage of without (#2369) --- readme.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/readme.md b/readme.md index 25f49a38..8cc03351 100644 --- a/readme.md +++ b/readme.md @@ -319,6 +319,8 @@ export default () => ( 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). +##### Replace instead of push url + The default behaviour for the `` component is to `push` a new url into the stack. You can use the `replace` prop to prevent adding a new entry. ```jsx @@ -329,6 +331,18 @@ export default () => ( ) ``` +##### Using a component that support `onClick` + +`` supports any component that supports the `onClick` event. In case you don't provide an `` tag, it will only add the `onClick` event handler and won't pass the `href` property. + +```jsx +// pages/index.js +import Link from 'next/link' +export default () => ( +
Click
+) +``` + #### Imperatively