T
TanStack17h ago
correct-apricot

Recommended approach to type-narrowing `useMutationState`?

I'm trying to get the strictly-typed mutation state of a specific mutation that's performed on a previous page but not sure if there's an elegant way of doing this with useMutationState. From what I can tell, query uses a wide type because it's pretty difficult to infer the actual mutation state type based on the options for useMutationState, which is understandable. What's the recommended approach in this case? Do manual narrowing in the predicate or select options?
1 Reply
correct-apricot
correct-apricotOP17h ago
hm i guess this is the relevant github issue: https://github.com/TanStack/query/issues/6843

Did you find this page helpful?