Update readme.md (#3957)

Update readme for scroll props related to #3950
This commit is contained in:
Jimmy Moon
2018-03-07 08:38:11 +01:00
committed by Tim Neutkens
parent dac6e9c17d
commit 84493a67b3
+9
View File
@@ -429,6 +429,15 @@ export default ({ href, name }) =>
</Link>
```
##### Disabling the scroll changes to top on page
The default behaviour of `<Link>` is to scroll to the top of the page. When there is a hash defined it will scroll to the specific id, just like a normal `<a>` tag. To prevent scrolling to the top / hash `scroll={false}` can be added to `<Link>`:
```jsx
<Link scroll={false} href="/?counter=10"><a>Disables scrolling</a></Link>
<Link href="/?counter=10"><a>Changes with scrolling to top</a></Link>
```
#### Imperatively
<p><details>