mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Update README.md for with-shallow-routing example (#3285)
This commit is contained in:
parent
fbd4f03254
commit
c0581a40cc
|
@ -7,8 +7,8 @@
|
||||||
Download the example [or clone the repo](https://github.com/zeit/next.js):
|
Download the example [or clone the repo](https://github.com/zeit/next.js):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl https://codeload.github.com/zeit/next.js/tar.gz/master | tar -xz --strip=2 next.js-master/examples/hello-world
|
curl https://codeload.github.com/zeit/next.js/tar.gz/master | tar -xz --strip=2 next.js-master/examples/with-shallow-routing
|
||||||
cd hello-world
|
cd with-shallow-routing
|
||||||
```
|
```
|
||||||
|
|
||||||
Install it and run:
|
Install it and run:
|
||||||
|
@ -28,4 +28,4 @@ now
|
||||||
|
|
||||||
With shallow routing, we could change the URL without actually running the `getInitialProps` every time you change the URL.
|
With shallow routing, we could change the URL without actually running the `getInitialProps` every time you change the URL.
|
||||||
|
|
||||||
We do this passing the `shallow: true` option to `Router.push` or `Router.replace`.
|
We do this passing the `shallow: true` option to `Router.push` or `Router.replace`.
|
||||||
|
|
Loading…
Reference in a new issue