Skip to content

Commit

Permalink
docs: fix empty return on remix
Browse files Browse the repository at this point in the history
  • Loading branch information
Balastrong committed Nov 16, 2024
1 parent 72579d1 commit d505b2c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/react/remix/app/routes/_index/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export async function action({ request }: ActionFunctionArgs) {
}

// Your form has successfully validated!
return null
}

export default function Index() {
Expand All @@ -48,7 +49,7 @@ export default function Index() {
const form = useForm({
...formOpts,
transform: useTransform(
(baseForm) => mergeForm(baseForm, actionData ?? initialFormState),
(baseForm) => mergeForm(baseForm, actionData ?? {}),
[actionData],
),
})
Expand Down

0 comments on commit d505b2c

Please sign in to comment.