-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Closed
Description
Describe the bug
I have been playing around with v2 and v3 to experiment for a new project, and have noticed that the returned type for useQuery
is incorrect with suspense.
I am beginning to think there should be an aliased function with different return types for suspense.
To Reproduce
- Write any code that uses
useQuery
const { data } = useQuery<Todo[]>('todos', getTodos);
- Notice that you can't use data in a typescript project without first checking if its undefined because the returned type is
Todo[] | undefined
sergiodxa, tatchi, salmanbabri, heleg, m-davoodi and 15 more
Metadata
Metadata
Assignees
Labels
No labels