"use client"; import { signup } from "./actions"; import { useActionState } from "react"; export default function SignupForm() { const [state, action, pending] = useActionState(signup, undefined); return (
{state?.errors?.name &&

{state.errors.name}

}
{state?.errors?.password && (

Password must:

)}
); }