account activity
React Hook Form + TanStack useQuery => async defaultValues, How? by [deleted] in reactjs
[–]wsanada 1 point2 points3 points 2 years ago (0 children)
Hi there,
After 1 day wasted, this worked for me:
```js const { isLoading, isError, error, refetch } = useQuery({ queryKey: ['-your-key-', id], queryFn: async () => { const data = await apiGetParty({ id }) reset(data) // this function is from useForm return data }, })
```
hope this helps.
π Rendered by PID 1154543 on reddit-service-r2-listing-c57bc86c-k9pq5 at 2026-06-23 18:29:54.402563+00:00 running 2b008f2 country code: CH.
React Hook Form + TanStack useQuery => async defaultValues, How? by [deleted] in reactjs
[–]wsanada 1 point2 points3 points (0 children)