Skip to content

Commit 4516554

Browse files
authored
docs: fix empty return on remix (#1022)
1 parent 72579d1 commit 4516554

File tree

1 file changed

+2
-1
lines changed
  • examples/react/remix/app/routes/_index

1 file changed

+2
-1
lines changed

examples/react/remix/app/routes/_index/route.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export async function action({ request }: ActionFunctionArgs) {
4040
}
4141

4242
// Your form has successfully validated!
43+
return null
4344
}
4445

4546
export default function Index() {
@@ -48,7 +49,7 @@ export default function Index() {
4849
const form = useForm({
4950
...formOpts,
5051
transform: useTransform(
51-
(baseForm) => mergeForm(baseForm, actionData ?? initialFormState),
52+
(baseForm) => mergeForm(baseForm, actionData ?? {}),
5253
[actionData],
5354
),
5455
})

0 commit comments

Comments
 (0)