T
TanStack5mo ago
deep-jade

form.Field TS Error: Property name does not exist on type IntrinsicAttributes

When I try to use <form.Field /> Typescript is complaining that the name property does not exist, even though hovering over Field the type looks correct to me. I cannot reproduce this on codesandbox unfortunately, there it just works so I guess it's something with my setup? I'm on React 19, Nextjs 15, Tanstack Form ^1.3.0
No description
No description
5 Replies
complex-teal
complex-teal5mo ago
perhaps it‘s confused by the variable name? It might think that you‘re referring to the vanilla react <form> which doesn‘t have name. What happens if you name the useForm constant something different? IntrinsicAttributes are properties that can be passed to JSX elements, including div, p and of course form.
deep-jade
deep-jadeOP5mo ago
No description
deep-jade
deep-jadeOP5mo ago
same thing this also happens in webstorm btw, so its not something in my tsserver in neovim
deep-jade
deep-jadeOP5mo ago
No description
deep-jade
deep-jadeOP5mo ago
during next build there is this issue, i assume its related It was my typescript version, I was on 4, needed to ugprade to typescript 5. Thanks to the peer dependency warning

Did you find this page helpful?