Skip to content

Commit b8bcc36

Browse files
docs: capitalize 'Actions' in useActionState.md
Capitalize React Actions concept per style guide (#6713). - 'actions' → 'Actions' when referring to the React concept - Keep lowercase for general programming terms and parameter names
1 parent abe931a commit b8bcc36

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/content/reference/react/useActionState.md

Lines changed: 2 additions & 2 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>
@@ -100,7 +100,7 @@ Each time you call `dispatchAction`, React calls the `reducerAction` with the `a
100100
101101
#### Caveats {/*reduceraction-caveats*/}
102102
103-
* `reducerAction` can be sync or async. It can perform sync actions like showing a notification, or async actions like posting updates to a server.
103+
* `reducerAction` can be sync or async. It can perform sync Actions like showing a notification, or async Actions like posting updates to a server.
104104
* `reducerAction` is not invoked twice in `<StrictMode>` since `reducerAction` is designed to allow side effects.
105105
* The return type of `reducerAction` must match the type of `initialState`. If TypeScript infers a mismatch, you may need to explicitly annotate your state type.
106106
* If you set state after `await` in the `reducerAction` you currently need to wrap the state update in an additional `startTransition`. See the [startTransition](/reference/react/useTransition#react-doesnt-treat-my-state-update-after-await-as-a-transition) docs for more info.

0 commit comments

Comments
 (0)