see updated post example for using v6+ - https://dev.to/aaronksaunders/using-react-hook-form-with-ionic-react-components-update-1463
Setting up ...
For further actions, you may consider blocking this person and/or reporting abuse
I noticed when I ported the code, that react-hook-form in codesandbox.io is older than the latest version. In the latest version, there is a breaking change.
Before:
now:
github.com/react-hook-form/react-h...
@aaronksaunders Thank you. This article was a life saver. Is there a way to handle
IonCheckbox
? I tried the approach similar to Radio button but, doesn't work.just seeing this, did you get it resolved yet?
Not yet. I'm currently working on something else. Will update you by the end of the day.
Thanks for the post, very useful. If I actually want to submit the data to send to an email address, can I just use something like Formspree to do so and it will work in the native iOs and Android apps? Or would it be better to put it in something like firebase and send it from there?
you can use formspree, from what I have seen it should work
great, thanks! Will give it a go. And Thanks for replying so quickly.
Thank you very much for writing up this awesome blog post.
your welcome, extremely helpful hook for efficiently managing forms in react... working on a new one showing hook use in modals and overmindjs for state management
looking forward for that!
This is great info, not many examples are out there. I posted comment on other areas where your content is displayed for other users, but this will break if you are using react-hook-form v6+.
In order to use the method from this post, you would have to use v5.7.2 or below
working on an updated post - dev.to/ionic/using-react-hook-form...
Added a gist with the typescript version of the code to the blog post
gist.github.com/aaronksaunders/862...
Really useful, you saved me.
glad it was helpful to you!
formState.isValid: {(formState.isValid === true).toString()}
Why is it inside a label?
not sure I understand the question
Great article. You may want to do an article on Formtik as well.