awake-maroonA
Refineโ€ข3y agoโ€ข
5 replies
awake-maroon

how to adding custom type in option(queryOptions) select useCustom ?

my use case is to overrides data from api via select options(queryOptions) but i dont know how to adding custom type in useCustom to overrides existing type. according to tkdodo blog (https://tkdodo.eu/blog/react-query-and-type-script) the way to overrides generic type TQueryFnData is adding new type in 3rd generic type called TData = TQueryFnData in useQuery. how can i do to overrides TData from useCustom ? sorry for my bad english
image.png
Combine two of the most powerful tools for React Apps to produce great user experience, developer experience and type safety.
React Query and TypeScript
Was this page helpful?