From aa0c547cd6b2cc63b53ba3fc57ec009af1353ecb Mon Sep 17 00:00:00 2001 From: Aki Matsumoto <45055030+nonoakij@users.noreply.github.com> Date: Wed, 22 Nov 2023 08:27:35 +0900 Subject: [PATCH] Fix: incorrect sample code in documentation related to Server action (#6445) * Fix: component not returned * Fix: missing function statement --- .../reference/react-dom/hooks/useFormStatus.md | 2 +- src/content/reference/react/use-server.md | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/content/reference/react-dom/hooks/useFormStatus.md b/src/content/reference/react-dom/hooks/useFormStatus.md index 67a06022..02e48973 100644 --- a/src/content/reference/react-dom/hooks/useFormStatus.md +++ b/src/content/reference/react-dom/hooks/useFormStatus.md @@ -38,7 +38,7 @@ function Submit() { return } -export default App() { +export default function App() { return (
diff --git a/src/content/reference/react/use-server.md b/src/content/reference/react/use-server.md index 938efa90..63816336 100644 --- a/src/content/reference/react/use-server.md +++ b/src/content/reference/react/use-server.md @@ -115,11 +115,13 @@ async function requestUsername(formData) { // ... } -export default App() { - - - - +export default function App() { + return ( +
+ + +
+ ); } ```