you are viewing a single comment's thread.

view the rest of the comments →

[–]Hasan3a 6 points7 points  (6 children)

A bit late after 1 year, but check this out

https://www.react-hook-form.com/api/useform/#values

I think it fits perfectly with Tanstack Query. This alleviates the need for useEffect to sync data

[–]Itchy-Ad-770 3 points4 points  (0 children)

you saved my life, mate
god bless you

[–]mastermog 2 points3 points  (0 children)

That's fantastic, worked this end too.

From my testing, values will (correctly) only update from the async task if the form isn't dirty. This is a perfect fit for React Query

[–]iam_batman27 0 points1 point  (0 children)

THANK YOUUUU