Replies: 1 comment
-
This was a mistake from my side, as I was expecting...I had a reusable export const select = <T>(data: AxiosResponse<T>): T => data.data I was not passing this type argument |
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.
Uh oh!
There was an error while loading. Please reload this page.
-
version: 4.29.5
typescript: 5.0.2
Hi guys, I'm struggling with react-query in typescript, pretty sure lack of knowledge from my side.
I'm trying to use

useQuery
as this article suggests: https://tkdodo.eu/blog/react-query-meets-react-routerI'm not passing
initialData
because it doesn't exist on my context.The problem with this approach is
data
is of typeunknown
. I've tried with a plain object just for testing and the result was the same:Is there any way I can get this to work?
Beta Was this translation helpful? Give feedback.
All reactions