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

remove occurence of deprecated url prop in readme (#5786)

This commit is contained in:
Luc 2018-12-02 04:11:06 +08:00 committed by Tim Neutkens
parent a66e1c0d7c
commit e43d21fdf0

View file

@ -624,7 +624,7 @@ Router.events.on('routeChangeError', (err, url) => {
<p></p>
Shallow routing allows you to change the URL without running `getInitialProps`. You'll receive the updated `pathname` and the `query` via the `url` prop of the same page that's loaded, without losing state.
Shallow routing allows you to change the URL without running `getInitialProps`. You'll receive the updated `pathname` and the `query` via the `router` prop (injected using [`withRouter`](#using-a-higher-order-component)), without losing state.
You can do this by invoking either `Router.push` or `Router.replace` with the `shallow: true` option. Here's an example: