Jan Henning
Jan Henning10mo ago

`refetchOnWindowFocus` with RSC?

Hi. Is there any way to have refetchOnWindowFocus work with server components? Seems like it only available for client side. Perhaps I can use revalidatePath() to handle this? Not 100% sure what the best/optimal solution is.
"next": "^13.5.6",
"@trpc/client": "^10.41.0",
"@trpc/next": "^10.41.0",
"@trpc/react-query": "^10.41.0",
"@trpc/server": "^10.41.0"
"next": "^13.5.6",
"@trpc/client": "^10.41.0",
"@trpc/next": "^10.41.0",
"@trpc/react-query": "^10.41.0",
"@trpc/server": "^10.41.0"
2 Replies
BeBoRE
BeBoRE10mo ago
Server side components don’t run code on client, if you want to refetch you have to trigger a router.reload.
Jan Henning
Jan Henning10mo ago
Yeah, I think I may have been a bit tired last night 😂 I'll just convert to fetching on client to give me a bit more control Thank you!