Replies: 1 comment 1 reply
-
The overloads of the function are only needed because we (currently) support multiple ways of calling a query:
when you build your custom abstractions for your product, it's very unlikely that you'll mix and match those three patterns. If you choose one, you won't have to implement all the overloads :) |
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
At our current project we have a need to extend the default useQuery with some custom logic. Basically we need to disable queries if the user is not authenticated. For this I created my own custom hook
useAuthenticatedQuery
.My objective was to seamlessly switch between
useQuery
anduseAuthenticatedQuery
.It works like a charm but the only problem is that the implementation uses
parseQueryArgs
which is not exported from the package. I had to copy-paste this function along withisQueryKey
to make this approach work.Would it be possible to export
parseQueryArgs
or what is the right approach to what I am trying to achieve?Best regards!
P.S.: this library is a life-saver!
Beta Was this translation helpful? Give feedback.
All reactions