Wrong data type when use with Query Key Factory
Hi everyone,
I'm using React Query (React v5) + Query Key Factory + Typescript
I have created query keys with
Codesandbox example: https://codesandbox.io/s/priceless-sara-ieo874?file=/src/App.tsx
In the example above, you can see the
Is there a way to get the type correctly without define it in
I'm using React Query (React v5) + Query Key Factory + Typescript
I have created query keys with
queryFn already, which's returning a promise of array, but when I try to get data (query.data) it's giving me an object, so my linter is complaining about it.Codesandbox example: https://codesandbox.io/s/priceless-sara-ieo874?file=/src/App.tsx
In the example above, you can see the
<List items={query.data} /> having lint errorIs there a way to get the type correctly without define it in
useQuery, like: useQuery<MyDataType>(queries.foo()) ?CodeSandbox
priceless-sara-ieo874 using @lukemorales/query-key-factory, loader-utils, react, react-dom, react-query, react-scripts
