Skip to content

Commit d185c6b

Browse files
committed
docs: capitalize React Actions references
1 parent 47e64bf commit d185c6b

5 files changed

Lines changed: 16 additions & 16 deletions

File tree

src/content/learn/rsc-sandbox-test.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ export default function UserCard({ userPromise, serverTime }) {
286286

287287
## Flight Data Types in Server Actions {/*flight-data-types-actions*/}
288288

289-
This demo sends Map, Set, Date, and BigInt from a client component *to* a server action via `encodeReply`/`decodeReply`, then verifies the types survived the round trip.
289+
This demo sends Map, Set, Date, and BigInt from a client component *to* a Server Action via `encodeReply`/`decodeReply`, then verifies the types survived the round trip.
290290

291291
<SandpackRSC>
292292

@@ -310,7 +310,7 @@ export default async function App() {
310310
))}
311311
</div>
312312
) : (
313-
<p>Click the button to send typed data to the server action.</p>
313+
<p>Click the button to send typed data to the Server Action.</p>
314314
)}
315315
</div>
316316
);
@@ -390,7 +390,7 @@ export default function TestButton({ testTypes }) {
390390

391391
## Server Action Mutation + Re-render {/*action-mutation-rerender*/}
392392

393-
The server action mutates server-side data and returns a confirmation string. The updated list is only visible because the framework automatically re-renders the entire server component tree after the action completes — the server component re-reads the data and streams the new UI to the client.
393+
The Server Action mutates server-side data and returns a confirmation string. The updated list is only visible because the framework automatically re-renders the entire server component tree after the Action completes — the server component re-reads the data and streams the new UI to the client.
394394

395395
<SandpackRSC>
396396

@@ -407,7 +407,7 @@ export default function App() {
407407
<p style={{ color: '#666', fontSize: 13 }}>
408408
This list is rendered by a server component
409409
reading server-side data. It only updates because
410-
the server re-renders after each action.
410+
the server re-renders after each Action.
411411
</p>
412412
<ul>
413413
{todos.map((todo, i) => (
@@ -487,7 +487,7 @@ export default function AddTodo({ createTodo }) {
487487

488488
## Inline Server Actions {/*inline-server-actions*/}
489489

490-
Server actions defined inline inside a server component with `'use server'` on the function body. The action closes over module-level state and is passed as a prop — no separate `actions.js` file needed.
490+
Server Actions defined inline inside a server component with `'use server'` on the function body. The Action closes over module-level state and is passed as a prop — no separate `actions.js` file needed.
491491

492492
<SandpackRSC>
493493

@@ -572,4 +572,4 @@ export default function LikeButton({ addLike }) {
572572
}
573573
```
574574

575-
</SandpackRSC>
575+
</SandpackRSC>

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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ function MyCart({initialState}) {
6060
* The `dispatchAction` function has a stable identity, so you will often see it omitted from Effect dependencies, but including it will not cause the Effect to fire. If the linter lets you omit a dependency without errors, it is safe to do. [Learn more about removing Effect dependencies.](/learn/removing-effect-dependencies#move-dynamic-objects-and-functions-inside-your-effect)
6161
* When using the `permalink` option, ensure the same form component is rendered on the destination page (including the same `reducerAction` and `permalink`) so React knows how to pass the state through. Once the page becomes interactive, this parameter has no effect.
6262
* When using Server Functions, `initialState` needs to be [serializable](/reference/rsc/use-server#serializable-parameters-and-return-values) (values like plain objects, arrays, strings, and numbers).
63-
* If `dispatchAction` throws an error, React cancels all queued actions and shows the nearest [Error Boundary](/reference/react/Component#catching-rendering-errors-with-an-error-boundary).
63+
* If `dispatchAction` throws an error, React cancels all queued Actions and shows the nearest [Error Boundary](/reference/react/Component#catching-rendering-errors-with-an-error-boundary).
6464
* If there are multiple ongoing Actions, React batches them together. This is a limitation that may be removed in a future release.
6565
6666
<Note>
@@ -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
@@ -1526,7 +1526,7 @@ function MyComponent() {
15261526
}
15271527
```
15281528
1529-
Or pass `dispatchAction` to an Action prop, is call in a Transition:
1529+
Or pass `dispatchAction` to an Action prop, which calls it in a Transition:
15301530
15311531
```js
15321532
function MyComponent() {

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.
@@ -1248,7 +1248,7 @@ This is recommended for three reasons:
12481248
12491249
- [Transitions are interruptible,](#perform-non-blocking-updates-with-actions) which lets the user click away without waiting for the re-render to complete.
12501250
- [Transitions prevent unwanted loading indicators,](#preventing-unwanted-loading-indicators) which lets the user avoid jarring jumps on navigation.
1251-
- [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.
1251+
- [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.
12521252
12531253
Here is a simplified router example using Transitions for navigations.
12541254
@@ -1945,7 +1945,7 @@ export async function updateQuantity(newName) {
19451945
19461946
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.
19471947
1948-
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.
1948+
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.
19491949
19501950
19511951
Example of `useActionState` handling execution order:

src/content/reference/rsc/server-functions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title: Server Functions
66

77
Server Functions are for use in [React Server Components](/reference/rsc/server-components).
88

9-
**Note:** Until September 2024, we referred to all Server Functions as "Server Actions". If a Server Function is passed to an action prop or called from inside an action then it is a Server Action, but not all Server Functions are Server Actions. The naming in this documentation has been updated to reflect that Server Functions can be used for multiple purposes.
9+
**Note:** Until September 2024, we referred to all Server Functions as "Server Actions". If a Server Function is passed to an action prop or called from inside an Action, then it is a Server Action, but not all Server Functions are Server Actions. The naming in this documentation has been updated to reflect that Server Functions can be used for multiple purposes.
1010

1111
</RSC>
1212

@@ -174,7 +174,7 @@ For more, see the docs for [Server Functions in Forms](/reference/rsc/use-server
174174

175175
### Server Functions with `useActionState` {/*server-functions-with-use-action-state*/}
176176

177-
You can call Server Functions with `useActionState` for the common case where you just need access to the action pending state and last returned response:
177+
You can call Server Functions with `useActionState` for the common case where you just need access to the pending state for the Action and the last returned response:
178178

179179
```js [[1, 3, "updateName"], [1, 6, "updateName"], [2, 6, "submitAction"], [2, 9, "submitAction"]]
180180
"use client";

0 commit comments

Comments
 (0)