Yonatan Lavy
Yonatan Lavy4w ago

tRPC prevents me from using revalidatePath to invalidate cache on the client

It still invalidates the cache on the server side(so on forced refresh it is shown), but doesn't invalidate the cache on my ssr rendered pages/layouts. this causes my users to be stuck and see stale data this persists for SSR rendered pages that don't use trpc, and for when using them with a query from trpc that is being manually revalidated with trpc utils I tried using trpc 11, also tried moving to 10.45 (latest stable) and it persists I tried workarounds, couldn't find a way to make this happen What am i missing? using these packages: "@trpc/client": "^11.0.0-rc.446", "@trpc/react-query": "^11.0.0-rc.446", "@trpc/server": "^11.0.0-rc.446", "@tanstack/react-query": "^5.50.0", and this code: https://github.com/yehonatanyosefi/trpctest
GitHub
GitHub - yehonatanyosefi/trpctest
Contribute to yehonatanyosefi/trpctest development by creating an account on GitHub.
3 Replies
Alex / KATT 🐱
Sorry, what is the problem? Can you explain again - what are you seeing and what are you expecting? Make an example that us runable 🙏 you can fork our next app dir example project
Yonatan Lavy
Yonatan LavyOP2w ago
Stack Overflow
tRPC prevents me from using revalidatePath to invalidate cache on t...
It still invalidates the cache on the server side(so on forced refresh it is shown), but doesn't invalidate the cache on my ssr rendered pages/layouts. This causes my users to be stuck and see stal...
Yonatan Lavy
Yonatan LavyOP2w ago
what is the url? what exactly isn't clear from my original question? I'll try make it clearer