From 2a20ec3ea77c1bac86bbb55901da7cff6b2cd8a4 Mon Sep 17 00:00:00 2001 From: Brooks Lybrand Date: Fri, 22 Nov 2024 10:56:39 -0600 Subject: [PATCH] docs: fix some broken links and prerelease references --- docs/start/framework/actions.md | 2 +- docs/start/framework/installation.md | 5 +++-- docs/start/framework/navigating.md | 2 +- docs/start/framework/pending-ui.md | 2 +- docs/upgrading/remix.md | 8 +------- docs/upgrading/v6.md | 4 ++-- 6 files changed, 9 insertions(+), 14 deletions(-) diff --git a/docs/start/framework/actions.md b/docs/start/framework/actions.md index 39c8ff2c4c..5725643eae 100644 --- a/docs/start/framework/actions.md +++ b/docs/start/framework/actions.md @@ -167,5 +167,5 @@ See the [Using Fetchers][fetchers] guide for more information. Next: [Navigating](./navigating) -[fetchers]: ../how-to/fetchers +[fetchers]: ../../how-to/fetchers [data]: ../../api/react-router/data diff --git a/docs/start/framework/installation.md b/docs/start/framework/installation.md index b47bb6569a..23677860e7 100644 --- a/docs/start/framework/installation.md +++ b/docs/start/framework/installation.md @@ -8,7 +8,7 @@ order: 1 Most projects start with a template. Let's use a basic template maintained by React Router: ```shellscript nonumber -npm create react-router@pre my-react-router-app +npx create-react-router@latest my-react-router-app ``` Now change into the new directory and start the app @@ -21,7 +21,7 @@ npm run dev You can now open your browser to `http://localhost:5173` -You can [view the template on GitHub](https://github.com/remix-run/react-router/tree/dev/templates/basic) to see how to manually set up your project. +You can [view the template on GitHub][default-template] to see how to manually set up your project. @@ -30,3 +30,4 @@ You can [view the template on GitHub](https://github.com/remix-run/react-router/ Next: [Routing](./routing) [manual_usage]: ../how-to/manual-usage +[default-template]: https://github.com/remix-run/react-router-templates/tree/main/default diff --git a/docs/start/framework/navigating.md b/docs/start/framework/navigating.md index 0582b7e603..d7deb5a52e 100644 --- a/docs/start/framework/navigating.md +++ b/docs/start/framework/navigating.md @@ -122,7 +122,7 @@ If the user enters "journey" into the input and submits it, they will navigate t /search?q=journey ``` -Forms with `
` will also navigate to the action prop but will submit the data as `FormData` instead of `URLSearchParams`. However, it is more common to `useFetcher()` to POST form data. See [Using Fetchers](../how-to/fetchers). +Forms with `` will also navigate to the action prop but will submit the data as `FormData` instead of `URLSearchParams`. However, it is more common to `useFetcher()` to POST form data. See [Using Fetchers](../../how-to/fetchers). ## redirect diff --git a/docs/start/framework/pending-ui.md b/docs/start/framework/pending-ui.md index b26f821c9d..f290fba552 100644 --- a/docs/start/framework/pending-ui.md +++ b/docs/start/framework/pending-ui.md @@ -134,4 +134,4 @@ function Task({ task }) { Next: [Testing](./testing) -[use_fetcher]: ../hooks/use-fetcher +[use_fetcher]: https://api.reactrouter.com/v7/functions/react_router.useFetcher.html diff --git a/docs/upgrading/remix.md b/docs/upgrading/remix.md index a779d14baa..b614de6f1d 100644 --- a/docs/upgrading/remix.md +++ b/docs/upgrading/remix.md @@ -26,7 +26,7 @@ Adopt all existing [future flags][v2-future-flags] in your Remix v2 application. Most of the "shared" APIs that used to be re-exported through the runtime-specific packages (`@remix-run/node`, `@remix-run/cloudflare`, etc.) have all been collapsed into `react-router` in v7. So instead of importing from `@react-router/node` or `@react-router/cloudflare`, you'll import those directly from `react-router`. ```diff --import { redirect } from "@react-router/node"; +-import { redirect } from "@remix-run/node"; +import { redirect } from "react-router"; ``` @@ -44,12 +44,6 @@ npx codemod remix/2/react-router/upgrade After the codemod updates your dependencies, you need to install the dependencies to remove Remix packages and add the new React Router packages. - - -While still in prerelease, you need to update your `package.json` to point to the prerelease versions of the `react-router` packages. - - - ```shellscript nonumber npm install ``` diff --git a/docs/upgrading/v6.md b/docs/upgrading/v6.md index 1bf2bdc03d..e34a5fe065 100644 --- a/docs/upgrading/v6.md +++ b/docs/upgrading/v6.md @@ -21,7 +21,7 @@ npm install react-router-dom@6 **Background** -Changes the relative path matching and linking for multi-segment splats paths like `dashboard/*` (vs. just `*`). [View the CHANGELOG](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md#minor-changes-2) for more information. +Changes the relative path matching and linking for multi-segment splats paths like `dashboard/*` (vs. just `*`). [View the CHANGELOG](https://github.com/remix-run/react-router/blob/main/CHANGELOG.md#futurev7_relativesplatpath) for more information. 👉 **Enable the flag** @@ -107,7 +107,7 @@ function Dashboard() { **Background** -This uses `React.useTransition` instead of `React.useState` for Router state updates. View the [CHANGELOG](https://github.com/remix-run/react-router/blob/main/CHANGELOG.md#v7_starttransition) for more information. +This uses `React.useTransition` instead of `React.useState` for Router state updates. View the [CHANGELOG](https://github.com/remix-run/react-router/blob/main/CHANGELOG.md#futurev7_starttransition) for more information. 👉 **Enable the flag**