From 2b1f959b7d5ad980f8903cbb648d3d2f134b0195 Mon Sep 17 00:00:00 2001 From: Luis Alvarez D Date: Mon, 13 Apr 2020 20:22:07 -0500 Subject: [PATCH] Update shallow routing docs (#11616) * Updated shallow routing docs * Include getStaticProps --- docs/routing/shallow-routing.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/routing/shallow-routing.md b/docs/routing/shallow-routing.md index 96fdb6dc4405a..c9d5b5e39bc61 100644 --- a/docs/routing/shallow-routing.md +++ b/docs/routing/shallow-routing.md @@ -11,7 +11,7 @@ description: You can use shallow routing to change the URL without triggering a -Shallow routing allows you to change the URL without running [`getInitialProps`](/docs/api-reference/data-fetching/getInitialProps.md). +Shallow routing allows you to change the URL without running data fetching methods again, that includes [`getServerSideProps`](/docs/basic-features/data-fetching.md#getserversideprops-server-side-rendering), [`getStaticProps`](/docs/basic-features/data-fetching.md#getstaticprops-static-generation), and [`getInitialProps`](/docs/api-reference/data-fetching/getInitialProps.md). You'll receive the updated `pathname` and the `query` via the [`router` object](/docs/api-reference/next/router.md#router-object) (added by [`useRouter`](/docs/api-reference/next/router.md#useRouter) or [`withRouter`](/docs/api-reference/next/router.md#withRouter)), without losing state. @@ -68,4 +68,4 @@ Shallow routing **only** works for same page URL changes. For example, let's ass Router.push('/?counter=10', '/about?counter=10', { shallow: true }) ``` -Since that's a new page, it'll unload the current page, load the new one and call `getInitialProps` even though we asked to do shallow routing. +Since that's a new page, it'll unload the current page, load the new one and wait for data fetching even though we asked to do shallow routing.