Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
docs(next/router): Update router.push api (vercel#24833)
Browse files Browse the repository at this point in the history
Documentation page: https://nextjs.org/docs/api-reference/next/router#routerpush

Add `locale`  as supported options in `route.push()` (vercel#17898)
  • Loading branch information
ErfanMirzapour committed May 5, 2021
1 parent 6122db1 commit aa31554
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/api-reference/next/router.md
Expand Up @@ -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.
Expand Down

0 comments on commit aa31554

Please sign in to comment.