-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Form with constraints components dont work with react 18 #58
Comments
To clarify, it looks to be caused breaking changes in the react typescript bindings. |
After struggling with a project just upgraded to React 18, I actually found a workaround. As far as I'm aware, the issue is just related to the typing, so it can be patched with some TypeScript, but it doesn't look pretty. You can do it like this.
Basically this overrides the type declarations for the module making them compatible with React 18. The ugly part is that in order to make the The actual fix should be quite trivial though, I'll try opening a PR if I have a moment. |
@andrec93p Thank you for that. I was looking at having to use something else for validation, which is a shame. Every other validation package seems to be way more complicated than they need to be and just plain invasive in the way they affect how you have to make the form/access the values. It would have meant reworking all the markup and even loading / saving logic in all of my apps forms. Thanks again. |
Big PR that fixes this (among other things): #59 |
Fix published in v0.19.0 |
When building with webpack / typescript / @babel/react react-form-with-constrains components prevent my project from building after updating to react 18.
Build functions again after downgrading back to react 17.
"FieldFeedbacks cannot be used as a jsx component"
"Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes & Pick<Readonly, never> & Partial<...>'."
The text was updated successfully, but these errors were encountered: