From d4a8edf771f9da88fc1a3570f50c39a9f1223f48 Mon Sep 17 00:00:00 2001 From: Harang Date: Fri, 9 Dec 2022 03:28:36 +0900 Subject: [PATCH] docs(migrating): fix broken react-router link (#43843) Fix broken link in migrating/from-react-router.md - https://nextjs.org/docs/migrating/from-react-router#code-splitting - https://nextjs.org/docs/migrating/from-react-router#scroll-restoration The current link is shown as 404 because it is redirected to the [document in react-router v6](https://reactrouter.com/en/main). ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md) ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md) ## Documentation / Examples - [x] Make sure the linting passes by running `pnpm build && pnpm lint` - [x] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md) --- docs/migrating/from-react-router.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/migrating/from-react-router.md b/docs/migrating/from-react-router.md index 1174eaa5ed3c9af..52986dc5b2eddac 100644 --- a/docs/migrating/from-react-router.md +++ b/docs/migrating/from-react-router.md @@ -134,7 +134,7 @@ Next.js has built-in support for [Server-side Rendering](/docs/basic-features/pa ## Code Splitting -Next.js has built-in support for [Code Splitting](https://reactrouter.com/web/guides/code-splitting). This means you can remove any instances of: +Next.js has built-in support for [Code Splitting](https://v5.reactrouter.com/web/guides/code-splitting). This means you can remove any instances of: - `@loadable/server`, `@loadable/babel-plugin`, and `@loadable/webpack-plugin` - Modifications to your `.babelrc` for `@loadable/babel-plugin` @@ -145,7 +145,7 @@ For more information, read about [Dynamic Imports](https://nextjs.org/docs/advan ## Scroll Restoration -Next.js has built-in support for [Scroll Restoration](https://reactrouter.com/web/guides/scroll-restoration). This means you can remove any custom `ScrollToTop` components you have defined. +Next.js has built-in support for [Scroll Restoration](https://v5.reactrouter.com/web/guides/scroll-restoration). This means you can remove any custom `ScrollToTop` components you have defined. The default behavior of `next/link` and `next/router` is to scroll to the top of the page. You can also [disable this](https://nextjs.org/docs/api-reference/next/link#disable-scrolling-to-the-top-of-the-page) if you prefer.