You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: GOVERNANCE.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -206,7 +206,7 @@ Matt, Bryan, Mark, and Pedro discussed the progress of various features, includi
206
206
- Mark noted that the RSC framework mode initial release will not be feature complete but is nearing completion, with the main remaining task being error handling during rendering ([RFC](https://github.com/remix-run/react-router/issues/11566))
207
207
- Upcoming Features and API Discussions
208
208
- Pedro discussed the `useRouterState` hook, noting that Ryan's attention is elsewhere, but they are interested in revisiting it for type safety and potentially replacing the `useRouteLoaderData` hook
209
-
- Brooks and Pedro agreed that the `use matches` API is problematic, especially concerning type safety, and suggested finding a solution that does not rely on it
209
+
- Brooks and Pedro agreed that the `useMatches` API is problematic, especially concerning type safety, and suggested finding a solution that does not rely on it
210
210
- We may be able to keep the distinction that hooks for use in data mode are less type-safe than the typegen equivalents in framework mode, so it might be ok for `useRouterState().matches` to be less type-safe than `Route.ComponentProps["matches"]`
@@ -281,7 +281,7 @@ Bryan proposed splitting `useFetcher` into two separate hooks: `useRouteLoader`
281
281
282
282
The conversation shifted towards aligning the new hooks with modern React APIs, especially those from React 19. Bryan suggested that the router could offload state tracking to userland by using React's `useTransition` and `useOptimistic` hooks, leading to a much slimmer abstraction. This would replace the existing `fetcher.state` (idle, loading, submitting) and `fetcher.form`.
283
283
284
-
**Leveraging Use Action State and Form Actions**
284
+
**Leveraging `useActionState` and Form Actions**
285
285
286
286
Jacob noted that using an asynchronous function for a form's action would also allow for use of the `useActionState` hook from React, which can track the pending status of the form, further streamlining the API. This design would also enable the deprecation of `fetcher.form` in favor of a standard React form. However, the group noted that this approach would be for JS-supported forms and not progressively enhanced forms in an RSC world without JavaScript.
287
287
@@ -311,9 +311,9 @@ Matt confirmed liking the name "default revalidate" and determined that it shoul
311
311
312
312
Matt shared that three stabilizations were pushed out: `environment API future flag`, `split route modules future flag`, and `fetch error reset`. Matt noted that `onError` would be in the next release after one last internal refactor to address potential double reporting issues in strict mode.
313
313
314
-
**`use route` and Type-Safe Fetchers**
314
+
**`useRoute` and Type-Safe Fetchers**
315
315
316
-
Matt discussed the plan to complete the other half of `use route`, the `use router state` functionality, and treating them as a package deal for stabilization. Pedro agreed, emphasizing the need for the type-safe fetcher approach to be cohesive with `use route` before stabilization, to avoid having multiple ways of doing things if the ID-based approach is changed later.
316
+
Matt discussed the plan to complete the other half of `useRoute`, the `useRouterState` functionality, and treating them as a package deal for stabilization. Pedro agreed, emphasizing the need for the type-safe fetcher approach to be cohesive with `useRoute` before stabilization, to avoid having multiple ways of doing things if the ID-based approach is changed later.
317
317
318
318
**Babel to SWC/Oxide Migration for Performance**
319
319
@@ -329,7 +329,7 @@ Discussion returned to an existing, highly voted proposal concerning fetcher err
329
329
330
330
**Inline Action Approach for Fetcher Error Handling**
331
331
332
-
The discussion moved towards an inline action approach for error handling, aligning with `client loader` mechanisms, as suggested by Jacob. Matt and Bryan considered how an inline handler could allow users to catch network errors and decide whether to return errors as data or throw. Sergio Daniel Xalambrí questioned whether these changes should be applied to the new type-safe fetchers (e.g., `use route action`) instead of evolving `use fetcher`. Matt and Bryan agreed that implementing this work within the new type-safe fetcher APIs, where `submit` would return data and reject on errors, seems like the most appropriate approach.
332
+
The discussion moved towards an inline action approach for error handling, aligning with `client loader` mechanisms, as suggested by Jacob. Matt and Bryan considered how an inline handler could allow users to catch network errors and decide whether to return errors as data or throw. Sergio Daniel Xalambrí questioned whether these changes should be applied to the new type-safe fetchers (e.g., `useRoute action`) instead of evolving `useFetcher`. Matt and Bryan agreed that implementing this work within the new type-safe fetcher APIs, where `submit` would return data and reject on errors, seems like the most appropriate approach.
0 commit comments