Replies: 2 comments 3 replies
-
Can you elaborate when this is a problem please? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Yes. https://stackblitz.com/edit/vitejs-vite-ujuh7q?file=src%2FApp.tsx Is an example of similar. I modify the user information in the modal and close the modal, if I open it again within 1 second, stale data will be used for defaultValues. If I want to use the latest data I need to use useEffect and setValue, or removeQueries when unmount. Or should I do it another way? Perhaps this is the wrong approach. |
Beta Was this translation helpful? Give feedback.
3 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.
-
I understand that set gcTime > 0 is to prevent infinite retries, but 1000 is a little too long.
For example, when I use useQuerySuspense results to useForm defaultValues, it is possible to use stale data.
Can we set a smaller gcTime like 10,100 here.
Beta Was this translation helpful? Give feedback.
All reactions