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

5 Replies
ambitious-aqua•8mo 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.ambitious-aquaOP•8mo ago

ambitious-aquaOP•8mo ago
same thing
this also happens in webstorm btw, so its not something in my tsserver in neovim
ambitious-aquaOP•8mo ago

ambitious-aquaOP•8mo 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