Replies: 2 comments 3 replies
-
as long as
|
Beta Was this translation helpful? Give feedback.
3 replies
-
For me |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm new to React Query and I can't figure out something that seems like it should be incredibly simple, and it probably is. If I make a hook like this:
The return type is
QueryObserverResult<TData, TError>
. If I try to access the the data either of the following ways I get any type for user:The queryFn seems to be inferring the type correctly:
(property) queryFn: () => Promise<User>
So what am I missing here? I tried typing the useMe hook as
QueryObserverResult<User, DefaultError>
and same deal. If I try to render something like this I get an implicit any error on session:{user?.sessions.map(session => (
I have react-query v. 5.31.0 and Typescript 5.2.2
Beta Was this translation helpful? Give feedback.
All reactions