Skip to content

Commit 57e3b32

Browse files
committed
Merge branch 'main' into release-next
2 parents 16dd742 + 2b12d33 commit 57e3b32

File tree

5 files changed

+20
-13
lines changed

5 files changed

+20
-13
lines changed

GOVERNANCE.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ This table gives a high-level overview of the stages, but please see the individ
8484
| Stage | Name | Entrance Criteria | Purpose |
8585
| ----- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
8686
| 0 | Proposal | Proposal discussion opened on GitHub | We start with a GitHub Proposal to provide the lowest barrier to RFC submission. Anyone can submit an RFC and community members can review, comment, up-vote without any initial involvement of the SC. |
87-
| 1 | Consideration | Proposal acceptance from 2 or more SC members | The consideration phase is the first "funnel" for incoming RFCs where the SC can officially express interest in the more popular RFCs. We only require 2 SC members to express interest to move an RFC into the **Consideration** phase to allow for low-friction experimentation of features in the **Alpha** stage. |
87+
| 1 | Consideration | Proposal acceptance from 2 SC members | The consideration phase is the first "funnel" for incoming RFCs where the SC can officially express interest in the more popular RFCs. We only require 2 SC members to express interest to move an RFC into the **Consideration** phase to allow for low-friction experimentation of features in the **Alpha** stage. |
8888
| 2 | Alpha | Pull request (PR) opened to implement the feature in an "unstable" state | The **Alpha** stage is the next funnel for RFCs. Once interest has been expressed by the SC in the **Consideration** phase we open the RFC up for a sample PR implementation and a mechanism for community members to alpha test the feature without requiring that anything be shipped in a React Router SemVer release. This stage allows evaluation of the RFC in running applications and consideration of what a practical implementation of the RFC looks like in the code. |
89-
| 3 | Beta | PR approval from at least 50% of the SC members indicating their acceptance of the PR for an unstable API | A RFC enters the **Beta** stage once enough members of the SC feel comfortable not only with the code for the beta feature, but have also seen positive feedback from alpha testers that the feature is working as expected. Once an **Alpha** stage PR has enough SC approvals, it will be merged and be included in the next React Router release. |
89+
| 3 | Beta | PR approval from 2 SC members indicating their acceptance of the PR for an unstable API | A RFC enters the **Beta** stage once enough members of the SC feel comfortable not only with the code for the beta feature, but have also seen positive feedback from alpha testers that the feature is working as expected. Once an **Alpha** stage PR has enough SC approvals, it will be merged and be included in the next React Router release. |
9090
| 4 | Stabilization | At least 1 month in the Beta stage and PR opened to stabilize the APIs. This PR should also include documentation for the new feature. | The **Stabilization** phase exists to ensure that unstable features are available for enough time for applications to update their React Router version and opt-into beta testing. We don't want to rush features through beta testing so that we have maximal feedback prior to stabilizing a feature. |
9191
| 5 | Stable | PR approval from at least 50% of the SC members indicating their acceptance of the PR for a stable API | A RFC is completed and enters the **Stable** stage once enough members of the SC feel comfortable not only with the code for the stable feature, but have also seen positive feedback from beta testers that the feature is working as expected. Once an **Beta** stage PR has enough SC approvals and has spent the required amount of time in the **Beta** stage, it can be merged and included in the next React Router release. |
9292

@@ -103,7 +103,7 @@ This table gives a high-level overview of the stages, but please see the individ
103103

104104
### Stage 1 — Consideration
105105

106-
- A proposal enters **Stage 1 — Consideration** when two or more SC members indicate interest/support for the idea as a valuable addition to React Router
106+
- A proposal enters **Stage 1 — Consideration** when 2 SC members indicate interest/support for the idea as a valuable addition to React Router
107107
- Upon entering this stage, a GitHub Issue will be created for the feature and added to the roadmap
108108
- These initial supporting SC members will be the champions for the feature and will be loosely responsible for shepherding the feature through the stages of the RFC process
109109
- At this stage, the proposal is eligible for a sample PR implementation from a core team or community member
@@ -129,7 +129,8 @@ This table gives a high-level overview of the stages, but please see the individ
129129

130130
### Stage 3 — Beta
131131

132-
- A proposal enters **Stage 3 — Beta** once it receives **Stage 2 — Alpha** PR approvals from at least 50% of the SC members and is merged to `dev`
132+
- A proposal enters **Stage 3 — Beta** once it receives **Stage 2 — Alpha** PR approvals from 2 SC members and is merged to `dev`
133+
- An SC member authoring the PR counts an an implicit approval, so in those cases explicit approval is required from 1 additional SC member
133134
- This will include the feature in `nightly` releases and the next normal SemVer release for broader beta testing under the `unstable_` flag
134135

135136
### Stage 4 — Stabilization

docs/how-to/form-validation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export async function action({
8989

9090
If any validation errors are found, they are returned from the `action` to the fetcher. This is our way of signaling to the UI that something needs to be corrected, otherwise the user will be redirected to the dashboard.
9191

92-
Note the `data({ errors }, { status: 400 })` call. Setting a 400 status is the web standard way to signal to the client that there was a validation error (Bad Request). In React Router, only 200 status codes trigger page data revalidation so a 400 prevent that.
92+
Note the `data({ errors }, { status: 400 })` call. Setting a 400 status is the web standard way to signal to the client that there was a validation error (Bad Request). In React Router, only 2xx status codes trigger page data revalidation, so sending a 400 status prevents the normal revalidation that would occur after an `action`.
9393

9494
## 3. Displaying Validation Errors
9595

docs/how-to/middleware.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ const authMiddleware = async ({ request, context }) => {
472472

473473
### `next()` and Error Handling
474474

475-
React Router contains built-in error handling via the route [`ErrorBoundary`][ErrorBoundary] export. Just like when a `action`/`loader` throws, if a `middleware` throws it will be caught and handled at the appropriate [`ErrorBoundary`] and a [`Response`][Response] will be returned through the ancestor `next()` call. This means that the `next()` function should never throw and should always return a [`Response`][Response], so you don't need to worry about wrapping it in a try/catch.
475+
React Router contains built-in error handling via the route [`ErrorBoundary`][ErrorBoundary] export. Just like when a `action`/`loader` throws, if a `middleware` throws it will be caught and handled at the appropriate [`ErrorBoundary`][ErrorBoundary] and a [`Response`][Response] will be returned through the ancestor `next()` call. This means that the `next()` function should never throw and should always return a [`Response`][Response], so you don't need to worry about wrapping it in a try/catch.
476476

477477
This behavior is important to allow middleware patterns such as automatically setting required headers on outgoing responses (i.e., committing a session) from a root `middleware`. If any error from a `middleware` caused `next()` to `throw`, we'd miss the execution of ancestor middlewares on the way out and those required headers wouldn't be set.
478478

docs/start/data/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ npm i react-router
2727

2828
Create a router and pass it to `RouterProvider`:
2929

30-
```tsx lines=[3-4,9-14,19]
30+
```tsx lines=[3-4,6-11,16]
3131
import React from "react";
3232
import ReactDOM from "react-dom/client";
3333
import { createBrowserRouter } from "react-router";

docs/start/framework/data-loading.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Loader data is automatically serialized from loaders and deserialized in compone
1515

1616
The type for the `loaderData` prop is [automatically generated][type-safety].
1717

18+
<docs-info>We try to support the same set of [serializable types][serializable-types] that React permits server components to pass as props to client components. This future proofs your application for any eventual migration to [RSC][rsc].</docs-info>
19+
1820
## Client Data Loading
1921

2022
`clientLoader` is used to fetch data on the client. This is useful for pages or full projects that you'd prefer to fetch data from the browser only.
@@ -182,14 +184,18 @@ export default function Product() {
182184

183185
---
184186

185-
Next: [Actions](./actions)
187+
Next: [Actions][actions]
186188

187189
See also:
188190

189-
- [Streaming with Suspense](../../how-to/suspense)
190-
- [Client Data](../../how-to/client-data)
191-
- [Using Fetchers](../../how-to/fetchers#loading-data)
191+
- [Streaming with Suspense][streaming]
192+
- [Client Data][client-data]
193+
- [Using Fetchers][fetchers]
192194

193-
[advanced_data_fetching]: ../tutorials/advanced-data-fetching
194-
[data]: ../../api/react-router/data
195195
[type-safety]: ../../explanation/type-safety
196+
[serializable-types]: https://react.dev/reference/rsc/use-client#serializable-types
197+
[rsc]: ../../how-to/react-server-components
198+
[actions]: ./actions
199+
[streaming]: ../../how-to/suspense
200+
[client-data]: ../../how-to/client-data
201+
[fetchers]: ../../how-to/fetchers#loading-data

0 commit comments

Comments
 (0)