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
docs: capitalize Actions (React 19 concept) in reference docs
Part of #6713
Capitalizes 'Actions' when referring to the React 19 Actions feature
(functions passed to startTransition) in the reference docs for hooks,
useActionState, and useTransition.
Leaves lowercase 'actions' untouched where it refers to general
programming concepts (reducer actions, user actions, DOM actions,
form filenames).
Copy file name to clipboardExpand all lines: src/content/reference/react/useActionState.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -269,7 +269,7 @@ Try clicking "Add Ticket" multiple times. Every time you click, a new `addToCart
269
269
270
270
We have to wait for the previous result of `addToCartAction` in order to pass the `prevCount` to the next call to `addToCartAction`. That means React has to wait for the previous Action to finish before calling the next Action.
271
271
272
-
You can typically solve this by [using with useOptimistic](/reference/react/useActionState#using-with-useoptimistic) but for more complex cases you may want to consider [cancelling queued actions](#cancelling-queued-actions) or not using `useActionState`.
272
+
You can typically solve this by [using with useOptimistic](/reference/react/useActionState#using-with-useoptimistic) but for more complex cases you may want to consider [cancelling queued Actions](#cancelling-queued-actions) or not using `useActionState`.
273
273
274
274
</DeepDive>
275
275
@@ -1423,7 +1423,7 @@ function action(prevState, formData) {
1423
1423
1424
1424
---
1425
1425
1426
-
### My actions are being skipped {/*actions-skipped*/}
1426
+
### My Actions are being skipped {/*actions-skipped*/}
1427
1427
1428
1428
If you call `dispatchAction` multiple times and some of them don't run, it may be because an earlier `dispatchAction` call threw an error.
These solutions handle request ordering for you. When using Transitions to build your own custom hooks or libraries that manage async state transitions, you have greater control over the request ordering, but you must handle it yourself.
@@ -1256,7 +1256,7 @@ This is recommended for three reasons:
1256
1256
1257
1257
- [Transitions are interruptible,](#perform-non-blocking-updates-with-actions) which lets the user click away without waiting for the re-render to complete.
1258
1258
- [Transitions prevent unwanted loading indicators,](#preventing-unwanted-loading-indicators) which lets the user avoid jarring jumps on navigation.
1259
-
- [Transitions wait for all pending actions](#perform-non-blocking-updates-with-actions) which lets the user wait for side effects to complete before the new page is shown.
1259
+
- [Transitions wait for all pending Actions](#perform-non-blocking-updates-with-actions) which lets the user wait for side effects to complete before the new page is shown.
1260
1260
1261
1261
Here is a simplified router example using Transitions for navigations.
1262
1262
@@ -1953,7 +1953,7 @@ export async function updateQuantity(newName) {
1953
1953
1954
1954
When clicking multiple times, it's possible for previous requests to finish after later requests. When this happens, React currently has no way to know the intended order. This is because the updates are scheduled asynchronously, and React loses context of the order across the async boundary.
1955
1955
1956
-
This is expected, because Actions within a Transition do not guarantee execution order. For common use cases, React provides higher-level abstractions like [`useActionState`](/reference/react/useActionState) and [`<form>`actions](/reference/react-dom/components/form) that handle ordering for you. For advanced use cases, you'll need to implement your own queuing and abort logic to handle this.
1956
+
This is expected, because Actions within a Transition do not guarantee execution order. For common use cases, React provides higher-level abstractions like [`useActionState`](/reference/react/useActionState) and [`<form>`Actions](/reference/react-dom/components/form) that handle ordering for you. For advanced use cases, you'll need to implement your own queuing and abort logic to handle this.
1957
1957
1958
1958
1959
1959
Example of `useActionState` handling execution order:
0 commit comments