From 38ee4af7c6be55df3ad48ff72adcada9c95e4880 Mon Sep 17 00:00:00 2001 From: Tyler Howard <22920537+Tyler98ky@users.noreply.github.com> Date: Thu, 9 Nov 2023 12:51:20 -0800 Subject: [PATCH] Fix naming convention of useFormState (#387) --- dashboard/final-example/app/ui/login-form.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dashboard/final-example/app/ui/login-form.tsx b/dashboard/final-example/app/ui/login-form.tsx index 1f68e2db..02e7615c 100644 --- a/dashboard/final-example/app/ui/login-form.tsx +++ b/dashboard/final-example/app/ui/login-form.tsx @@ -12,11 +12,11 @@ import { Button } from './button'; import { useFormState, useFormStatus } from 'react-dom'; export default function LoginForm() { - const [code, action] = useFormState(authenticate, undefined); + const [state, dispatch] = useFormState(authenticate, undefined); const { pending } = useFormStatus(); return ( -
+

Please log in to continue. @@ -64,7 +64,7 @@ export default function LoginForm() {

- {code === 'CredentialsSignin' && ( + {state === 'CredentialsSignin' && ( <>