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'm trying to figure out the staleTIme option. I have a query for site settings that I don't want to be fetched again for awhile or unless the settings change.
I have a useSiteSettings Hook, should I set staleTime like this?
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
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to figure out the staleTIme option. I have a query for site settings that I don't want to be fetched again for awhile or unless the settings change.
I have a useSiteSettings Hook, should I set
staleTime
like this?I'm using getServerSideProps for this one each page like this below:
Also, could I add this query to _app.js so I don't have to do it on every page?
Beta Was this translation helpful? Give feedback.
All reactions