useQuery making multiple parallel API calls #3630
-
Hey! I am using the same My question is, does |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
If they mount at the same time, the fetch should be deduplicated. If they mount one after the other, like component 2 only mounts after component 1 has finished fetching, you will get a background refetch because |
Beta Was this translation helpful? Give feedback.
If they mount at the same time, the fetch should be deduplicated. If they mount one after the other, like component 2 only mounts after component 1 has finished fetching, you will get a background refetch because
staleTime
defaults to0
. You can increasestaleTime
to define how "fresh" your resource is.