Replies: 1 comment
-
|
I'd glad to have in this example how to do async validation with values dependent on API call (as obtained from |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Greetings,
The "React Example: Query Integration" example is pretty half-baked for an in-Tanstack "integration". It shows two things that don't seem to be particular to Query:
A more robust example might describe a react-query integration that handles:
React hook form has the
valuesoption (separate fromdefaultValues) that resets the form on update, and Formik hasenableReinitializewhich does the same. Passing the query result data to these props is a nice integration that allows you to:It's not clear to me what the best way is to accomplish this with Tanstack Form. I understand the
onSuccesscallback inuseQueryhas been deprecated in latest, so I assume I shouldn't use that to callreset()on the form.I'd love to pick up tanstack form as I'm pretty over formik and react hook form and I love the tanstack field components and validation approach. Some actual integration or endorsed approach between tanstack-form and -query would be great.
And forgive me if I'm missing something in the docs that describes this behavior of reinitializing a live form as clean with a fresh query result.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions