-
On page load, the server provides my frontend the data to me for a list. I want to useQuery but not initially fetch, instead I want to tell useQuery, use this data but pretend you just fetched. And then after this point, everything works as normal, invalidating this will cause it to refetch. Is this possible? |
Beta Was this translation helpful? Give feedback.
Answered by
TkDodo
Jun 30, 2021
Replies: 1 comment 4 replies
-
I think it’s all here: https://react-query.tanstack.com/guides/ssr if you have a custom solution, just passing |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
Noitidart
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think it’s all here: https://react-query.tanstack.com/guides/ssr
if you have a custom solution, just passing
initialData
also works - it’s what it is for :)