Not able to seed react query cache
I was reading this blog post from the react-query dev: https://tkdodo.eu/blog/seeding-the-query-cache#seeding-details-from-lists
And trying to follow the "push approach" here for seeding the react query cache but adapting it to
@trpc/react-query
Here is the code I wrote.
But for some reason, the queryFn
I wrote is never getting run. Is queryFn
not supported in @trpc/react-query
? And if so, how should I go about seeding the cache as described in the blog?Seeding the Query Cache
With suspense for data fetching on the horizon, it is now more important than ever to make sure your cache is seeded properly to avoid fetch waterfalls.
0 Replies