TanStackT
TanStack4mo ago
17 replies
urgent-maroon

undefined formMeta on first render

Hello , when running the following example
const form = useForm({ defaultValues: { name: "" } });
console.log("form meta api", form.state.fieldMeta.name);

my application logs
undefined
, the types suggest that name is of type AnyFieldMeta which does not include
undefined
, this leads me to believe I am misunderstanding something.
Could the issue be that i am using nextjs? (i've checked with completly disabled ssr via dynamic import)
I am on latest version of "@tanstack/react-form": "^1.23.4"

If the solution is obvious and i am in fact misunderstanding something can you point me to the docs please?
Was this page helpful?