From aa31554acd5854b53735bf626409b740f3d5adc2 Mon Sep 17 00:00:00 2001 From: Erfan Mirzapour <52346515+ErfanMirzapour@users.noreply.github.com> Date: Thu, 6 May 2021 00:19:40 +0430 Subject: [PATCH] docs(next/router): Update router.push api (#24833) Documentation page: https://nextjs.org/docs/api-reference/next/router#routerpush Add `locale` as supported options in `route.push()` (#17898) --- docs/api-reference/next/router.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/api-reference/next/router.md b/docs/api-reference/next/router.md index 4922e9196d63220..5e095a553099f05 100644 --- a/docs/api-reference/next/router.md +++ b/docs/api-reference/next/router.md @@ -74,6 +74,7 @@ router.push(url, as, options) - `options` - Optional object with the following configuration options: - `scroll` - Optional boolean, controls scrolling to the top of the page after navigation. Defaults to `true` - [`shallow`](/docs/routing/shallow-routing.md): Update the path of the current page without rerunning [`getStaticProps`](/docs/basic-features/data-fetching.md#getstaticprops-static-generation), [`getServerSideProps`](/docs/basic-features/data-fetching.md#getserversideprops-server-side-rendering) or [`getInitialProps`](/docs/api-reference/data-fetching/getInitialProps.md). Defaults to `false` + - `locale` - Optional string, indicates locale of the new page > You don't need to use `router.push` for external URLs. [window.location](https://developer.mozilla.org/en-US/docs/Web/API/Window/location) is better suited for those cases.