-
Notifications
You must be signed in to change notification settings - Fork 7
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
useTypedController #6
Comments
Thanks @lionskape Do you have more example to migrate ? I think it's hard to handle all uses cases. @bluebill1049 what's your thoughts ? |
I am not codemod expert, I would assume migrate useTypedController would be tricky due to the input name itself is an array. |
@jorisre Unfortunately, useController is not a replacement of useTypedController. useTypedController creates a component, but useController creates an object. @bluebill1049 can you explain, what is a problem with name? Seems like we have to change array notation to the template string. By the way - it would be very useful, because useTypedController will no longer be maintained react-hook-form/strictly-typed#29 (comment) |
That's the problem which you have described, I think for any exiting useTypedControlled, you will have to manually convert to just useController. |
Describe the solution you'd like
replace such lines:
with
Additional context
We can create codemod for TypedController (from
@hookform/strictly-typed
package). It was working very similar way as a new Controller.TODO:
Handle new structure of render properties
The text was updated successfully, but these errors were encountered: