From d505b2c83cd18995e971210735309165f1db507c Mon Sep 17 00:00:00 2001 From: Leonardo Montini Date: Sat, 16 Nov 2024 20:23:47 +0100 Subject: [PATCH] docs: fix empty return on remix --- examples/react/remix/app/routes/_index/route.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/react/remix/app/routes/_index/route.tsx b/examples/react/remix/app/routes/_index/route.tsx index cff36670..eae3573c 100644 --- a/examples/react/remix/app/routes/_index/route.tsx +++ b/examples/react/remix/app/routes/_index/route.tsx @@ -40,6 +40,7 @@ export async function action({ request }: ActionFunctionArgs) { } // Your form has successfully validated! + return null } export default function Index() { @@ -48,7 +49,7 @@ export default function Index() { const form = useForm({ ...formOpts, transform: useTransform( - (baseForm) => mergeForm(baseForm, actionData ?? initialFormState), + (baseForm) => mergeForm(baseForm, actionData ?? {}), [actionData], ), })