-
In one useQuery we are doing some heavy filtering. Using the select option to do this. I now need that same selected data in another component. If I just use the same query id I get the raw data. I'm sure I'm doing something wrong, but how do you obtain only that selected data when you want to reuse the same query in a different component? |
Beta Was this translation helpful? Give feedback.
Answered by
TkDodo
May 1, 2021
Replies: 1 comment 2 replies
-
Write a custom hook that encapsulates useQuery with the select function and call it twice :) |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
TkDodo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Write a custom hook that encapsulates useQuery with the select function and call it twice :)