Exposing refetch from Provider: How to type it properly?
How do you type the returnType of
refetch when you expose it from a Provider?
ex.
1 Reply
wise-white•3y ago
I think this is probably the idiomatic way to do it:
You could do it in a few other ways but considering there's no specific type/interface exported for
refetch (as far as I can see), I'd probably go with the above.