Dynamic number of queries #493
-
I need to make a dynamic number of queries depending on user config:
Now of course we can't use hooks this way. What we need instead is a For example, I wrote a hook called usePromises, but it doesn't have all the stale-while-revalidate and other functionality of react-query. Any thought of adding this to react-query, or other suggestions? |
Beta Was this translation helpful? Give feedback.
Answered by
denisborovikov
May 14, 2020
Replies: 1 comment 5 replies
-
Use only one useQuery and retrive the all required data in your fetch function.
|
Beta Was this translation helpful? Give feedback.
5 replies
Answer selected by
agriffis
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use only one useQuery and retrive the all required data in your fetch function.