T
tRPC

`refetchOnWindowFocus` with RSC?

`refetchOnWindowFocus` with RSC?

JHJan Henning10/28/2023
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"
BBeBoRE10/29/2023
Server side components don’t run code on client, if you want to refetch you have to trigger a router.reload.
JHJan Henning10/29/2023
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!

Looking for more? Join the community!

T
tRPC

`refetchOnWindowFocus` with RSC?

Join Server