From 00e0e88376168067f3f53e897da3cec4c4a73712 Mon Sep 17 00:00:00 2001 From: Toru Kobayashi Date: Wed, 18 Oct 2023 15:33:26 +0900 Subject: [PATCH 1/2] fix: add a missing import statement in useFormStatus.md --- src/content/reference/react-dom/hooks/useFormStatus.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/content/reference/react-dom/hooks/useFormStatus.md b/src/content/reference/react-dom/hooks/useFormStatus.md index ec63ed31f62..5dbe6c030d2 100644 --- a/src/content/reference/react-dom/hooks/useFormStatus.md +++ b/src/content/reference/react-dom/hooks/useFormStatus.md @@ -30,6 +30,7 @@ const { pending, data, method, action } = useFormStatus(); The `useFormStatus` Hook provides status information of the last form submission. ```js {4},[[1, 5, "status.pending"]] +import { useFormStatus } from "react-dom"; import action from './actions'; function Submit() { @@ -257,4 +258,4 @@ export async function submitForm(query) { If the component that calls `useFormStatus` is not nested in a `
`, `status.pending` will always return `false`. Verify `useFormStatus` is called in a component that is a child of a `` element. -`useFormStatus` will not track the status of a `` rendered in the same component. See [Pitfall](#useformstatus-will-not-return-status-information-for-a-form-rendered-in-the-same-component) for more details. \ No newline at end of file +`useFormStatus` will not track the status of a `` rendered in the same component. See [Pitfall](#useformstatus-will-not-return-status-information-for-a-form-rendered-in-the-same-component) for more details. From dae8512d8f610036909f6146345c1374cc738424 Mon Sep 17 00:00:00 2001 From: Toru Kobayashi Date: Wed, 18 Oct 2023 16:28:23 +0900 Subject: [PATCH 2/2] Update src/content/reference/react-dom/hooks/useFormStatus.md Co-authored-by: Ahmed Abdelbaset --- src/content/reference/react-dom/hooks/useFormStatus.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/reference/react-dom/hooks/useFormStatus.md b/src/content/reference/react-dom/hooks/useFormStatus.md index 5dbe6c030d2..abaa9b6f2b2 100644 --- a/src/content/reference/react-dom/hooks/useFormStatus.md +++ b/src/content/reference/react-dom/hooks/useFormStatus.md @@ -29,7 +29,7 @@ const { pending, data, method, action } = useFormStatus(); The `useFormStatus` Hook provides status information of the last form submission. -```js {4},[[1, 5, "status.pending"]] +```js {5},[[1, 6, "status.pending"]] import { useFormStatus } from "react-dom"; import action from './actions';