next 13
How can I create a generic type of queries? Say I want to pass a prop through to a component such as this:
I am getting a type error on the 'count' value that's returned from the query, any idea how I would type this properly so that count isn't giving me errors or if there is a better way to generic type a query?
3 Replies
generous-apricot•3y ago
UseQueryResult ?
equal-aquaOP•3y ago
still getting this: Property count does not exist on type UseQueryResult<T[]>
generous-apricot•3y ago
Yes. What do you expect count to be?
I guess you meant to access data instead of count