icy.icicle
icy.icicle
TtRPC
Created by WO on 8/4/2023 in #❓-help
How to refetch data for a query when a mutation is performed in a different component?
@_typedef Not the most optimal solution, but check out what @alexkatt does: https://trpc.io/docs/client/react/useContext#invalidate-full-cache-on-every-mutation I hate it, but it will refetch every query on the page every time there is a mutation
10 replies
TtRPC
Created by WO on 8/4/2023 in #❓-help
How to refetch data for a query when a mutation is performed in a different component?
alex / KATT 's solution fixed the issue, but I am using firebase, and a full refresh of the data is not cost effective for me.
10 replies
TtRPC
Created by WO on 8/4/2023 in #❓-help
How to refetch data for a query when a mutation is performed in a different component?
I am also running into this issue. I try to do any of the .invalidate() functions using the context, but it doesn't cause a rerender in the other components. I tried .refetch() too.
10 replies