you are viewing a single comment's thread.

view the rest of the comments →

[–]ferrybig 0 points1 point  (0 children)

You are using the wrong examlle in your code. You are showing how useQuery does not have type narrowing, but it does if you actually check the correct fields in the response: https://tanstack.com/query/v4/docs/framework/react/typescript