-
Hey, I'm trying to access Query's data from a different component with subscription without reusing useQuery. I've been using queryClient.getQueryState to access data and useIsFetching to rerender component on each refetch, I'm wondering if this is the correct approach? I cannot just use useQuery again since I cannot access required arguments from every component. Thanks in advance |
Beta Was this translation helpful? Give feedback.
Answered by
TkDodo
Mar 11, 2024
Replies: 1 comment
-
how can you call |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
m-fraczek
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
how can you call
getQueryState
if you don't know thequeryKey
? If you know thequeryKey
, you can just as well calluseQuery
.