React 17 type issue on form.Field and form.Subscribe
Describe the bug
Getting this issue for the jsx components in react 17
Type 'ReactNode' is not assignable to type 'ReactElement<any, any> | null'. Type 'undefined' is not assignable to type 'ReactElement<any, any> | null'.
Your minimal, reproducible example
https://codesandbox.io/p/devbox/fklwm9
Steps to reproduce
- Create a react 17 project
"react": "^17.0.1",
"react-dom": "^17.0.1"
"@types/react": "^17.0.1",
"@types/react-dom": "^17.0.1"
- Use the simple form example
<form.Field>will throw the above ts error
Expected behavior
Expect the ts error to not be there and for react 17 to be supported.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
- Every system. Reproducible example in codesandbox.
TanStack Form adapter
None
TanStack Form version
v1.1.0
TypeScript version
No response
Additional context
No response
Any news about this?
i have the same problem, doesn't work with react 17 types atm
Same error on react 18.2.0
I have the same problem, doesn't work with react 17 types
I have the same issue
Me too. I have the same issue.
Sorry for the delay! It looks like the peerDeps need to be checked.
Related: #1829 #1828