Skip to content

Commit 490f1a6

Browse files
committed
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).
1 parent f3d9794 commit 490f1a6

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/content/reference/react/hooks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ These Hooks are mostly useful to library authors and aren't commonly used in the
116116
- [`useDebugValue`](/reference/react/useDebugValue) lets you customize the label React DevTools displays for your custom Hook.
117117
- [`useId`](/reference/react/useId) lets a component associate a unique ID with itself. Typically used with accessibility APIs.
118118
- [`useSyncExternalStore`](/reference/react/useSyncExternalStore) lets a component subscribe to an external store.
119-
* [`useActionState`](/reference/react/useActionState) allows you to manage state of actions.
119+
* [`useActionState`](/reference/react/useActionState) allows you to manage state of Actions.
120120
121121
---
122122

src/content/reference/react/useActionState.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ Try clicking "Add Ticket" multiple times. Every time you click, a new `addToCart
269269
270270
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.
271271
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`.
273273
274274
</DeepDive>
275275
@@ -1423,7 +1423,7 @@ function action(prevState, formData) {
14231423
14241424
---
14251425
1426-
### My actions are being skipped {/*actions-skipped*/}
1426+
### My Actions are being skipped {/*actions-skipped*/}
14271427
14281428
If you call `dispatchAction` multiple times and some of them don't run, it may be because an earlier `dispatchAction` call threw an error.
14291429

src/content/reference/react/useTransition.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ This is a basic example to demonstrate how Actions work, but this example does n
309309

310310
For common use cases, React provides built-in abstractions such as:
311311
- [`useActionState`](/reference/react/useActionState)
312-
- [`<form>` actions](/reference/react-dom/components/form)
312+
- [`<form>` Actions](/reference/react-dom/components/form)
313313
- [Server Functions](/reference/rsc/server-functions)
314314

315315
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:
12561256
12571257
- [Transitions are interruptible,](#perform-non-blocking-updates-with-actions) which lets the user click away without waiting for the re-render to complete.
12581258
- [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.
12601260
12611261
Here is a simplified router example using Transitions for navigations.
12621262
@@ -1953,7 +1953,7 @@ export async function updateQuantity(newName) {
19531953
19541954
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.
19551955
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.
19571957
19581958
19591959
Example of `useActionState` handling execution order:

0 commit comments

Comments
 (0)