You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a larger fetch with data that are relatively stable. I would like to avoid validations unless I am explicitly triggering them. Previously I managed this data in context and moved to useSWR.
If I have data from this fetch used in different components there is a re-validation by default. I do not mind focus validations but want to avoid unnecessary fetches due to components mounting. I tried the revalidateOnMount option in this case I am not getting an initial fetch.
I tried setting the dedup threshold very high but this also seems to prevent my manual validations (I was surprised by this).
Is there a way I can achieve what I want? No re-validation on mount but ensure my manual mutations are triggering a fetch?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
This is a great library, thanks.
I have a larger fetch with data that are relatively stable. I would like to avoid validations unless I am explicitly triggering them. Previously I managed this data in context and moved to useSWR.
If I have data from this fetch used in different components there is a re-validation by default. I do not mind focus validations but want to avoid unnecessary fetches due to components mounting. I tried the revalidateOnMount option in this case I am not getting an initial fetch.
I tried setting the dedup threshold very high but this also seems to prevent my manual validations (I was surprised by this).
Is there a way I can achieve what I want? No re-validation on mount but ensure my manual mutations are triggering a fetch?
Beta Was this translation helpful? Give feedback.
All reactions