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: src/content/reference/react/useActionState.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,7 @@ If used with a Server Function, `useActionState` allows the server's response fr
68
68
`useActionState` returns an array with the following values:
69
69
70
70
1. The current state. During the first render, it will match the `initialState` you have passed. After the action is invoked, it will match the value returned by the action.
71
-
2. A new action that you can pass as the `action` prop to your `form` component or `formAction` prop to any `button` component within the form.
71
+
2. A new action that you can pass as the `action` prop to your `form` component or `formAction` prop to any `button` component within the form. The action can also be called manually within [`startTransition`](/reference/react/startTransition).
72
72
3. The `isPending` flag that tells you whether there is a pending Transition.
73
73
74
74
#### Caveats {/*caveats*/}
@@ -102,8 +102,8 @@ function MyComponent() {
102
102
`useActionState` returns an array with the following items:
103
103
104
104
1. The <CodeStep step={1}>current state</CodeStep> of the form, which is initially set to the <CodeStep step={4}>initial state</CodeStep> you provided, and after the form is submitted is set to the return value of the <CodeStep step={3}>action</CodeStep> you provided.
105
-
2. A <CodeStep step={2}>new action</CodeStep> that you pass to `<form>` as its `action` prop.
106
-
3. A <CodeStep step={1}>pending state</CodeStep> that you can utilise whilst your action is processing.
105
+
2. A <CodeStep step={2}>new action</CodeStep> that you pass to `<form>` as its `action` prop or call manually within `startTransition`.
106
+
3. A <CodeStep step={1}>pending state</CodeStep> that you can utilise while your action is processing.
107
107
108
108
When the form is submitted, the <CodeStep step={3}>action</CodeStep> function that you provided will be called. Its return value will become the new <CodeStep step={1}>current state</CodeStep> of the form.
Copy file name to clipboardexpand all lines: src/content/reference/react/useImperativeHandle.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ function MyInput({ ref }) {
46
46
47
47
<Note>
48
48
49
-
Starting with React 19, [`ref` is available a prop.](/blog/2024/12/05/react-19#ref-as-a-prop) In React 18 and earlier, it was necessary to get the `ref` from [`forwardRef`.](/reference/react/forwardRef)
49
+
Starting with React 19, [`ref` is available as a prop.](/blog/2024/12/05/react-19#ref-as-a-prop) In React 18 and earlier, it was necessary to get the `ref` from [`forwardRef`.](/reference/react/forwardRef)
0 commit comments