rsnext/examples/with-shallow-routing
2020-08-29 22:32:35 -04:00
..
pages Update Examples for Fast Refresh (#13068) 2020-05-18 17:44:18 -04:00
.gitignore Added .gitignore to examples that are deployed to vercel (#15127) 2020-07-16 10:52:23 -04:00
package.json Ensure all examples are MIT licensed (#16691) 2020-08-29 22:32:35 -04:00
README.md Simplify example usage instructions (#16678) 2020-08-29 22:22:02 -04:00

Shallow Routing Example

With Shallow Routing, we can change the URL without running data fetching methods (like getStaticProps and getServerSideProps) again.

We do this by passing the shallow: true option to Router.push or Router.replace.

Deploy your own

Deploy the example using Vercel:

Deploy with Vercel

How to use

Execute create-next-app with npm or Yarn to bootstrap the example:

npx create-next-app --example with-shallow-routing with-shallow-routing-app
# or
yarn create next-app --example with-shallow-routing with-shallow-routing-app

Deploy it to the cloud with Vercel (Documentation).