How to pass TRPC (React Query) refetch() as prop to component in TypeScript?
Trying to pass the function as prop, but I can't figure out how to get the type definition from it. It's super long and I can't copy it from VSCode hover lol
6 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
yea i got that far, but then there's the issue that there are generic types in there
is that part just trivial ?
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Just encapsulate it inside another function and type it as () => void
You could also just
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View