Skip to content

Commit 10574e5

Browse files
koba04AhmedBaset
andauthored
fix: add a missing import statement in useFormStatus.md (#6356)
* fix: add a missing import statement in useFormStatus.md * Update src/content/reference/react-dom/hooks/useFormStatus.md Co-authored-by: Ahmed Abdelbaset <A7med3bdulBaset@gmail.com> --------- Co-authored-by: Ahmed Abdelbaset <A7med3bdulBaset@gmail.com>
1 parent b68e15a commit 10574e5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/content/reference/react-dom/hooks/useFormStatus.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ const { pending, data, method, action } = useFormStatus();
2929

3030
The `useFormStatus` Hook provides status information of the last form submission.
3131

32-
```js {4},[[1, 5, "status.pending"]]
32+
```js {5},[[1, 6, "status.pending"]]
33+
import { useFormStatus } from "react-dom";
3334
import action from './actions';
3435

3536
function Submit() {
@@ -257,4 +258,4 @@ export async function submitForm(query) {
257258
258259
If the component that calls `useFormStatus` is not nested in a `<form>`, `status.pending` will always return `false`. Verify `useFormStatus` is called in a component that is a child of a `<form>` element.
259260
260-
`useFormStatus` will not track the status of a `<form>` rendered in the same component. See [Pitfall](#useformstatus-will-not-return-status-information-for-a-form-rendered-in-the-same-component) for more details.
261+
`useFormStatus` will not track the status of a `<form>` rendered in the same component. See [Pitfall](#useformstatus-will-not-return-status-information-for-a-form-rendered-in-the-same-component) for more details.

0 commit comments

Comments
 (0)