1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Update README.md

This commit is contained in:
Guillermo Rauch 2016-12-19 07:17:33 -08:00 committed by GitHub
parent 7ab4f54971
commit 7baebd0c0f

View file

@ -183,15 +183,8 @@ You can also do client-side page transitions using the `next/router`
```jsx
import Router from 'next/router'
const routeTo(href) {
return (e) => {
e.preventDefault()
Router.push(href)
}
}
export default () => (
<div>Click <a href='#' onClick={routeTo('/about')}>here</a> to read more</div>
<div>Click <span onClick={() => Router.push('/about')}>here</span> to read more</div>
)
```