-
in short, it would be nice if setQueryDefaults could determine the types for the query. hi, I just started using react query, and trying to find the right way for us to use it - I'd like to use a query both in components/hooks and other functions. I'd like all these places to fetch only by name, without specifying queryFn or other configurations. the first thing I noticed is that to determine types I need to wrap all uses of the query and specify the type. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
the best way I've found so far is to use |
Beta Was this translation helpful? Give feedback.
-
sorry, I don't quite understand the question. Do you have an example maybe? |
Beta Was this translation helpful? Give feedback.
the best way I've found so far is to use
QueryOptions
everywhere, and never use query keys directly.