You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a use case where I need to make independent API calls simultaneously, but all of them depend on a query's result. Currently, I am doing something like the following. Curious if there is any better way to achieve this.
Since this is placed in a component and component could render multiple times using useMemo to generate queries. Otherwise queries will be generated every time the component renders. I didn't find the enabled attribute helpful since queries are generated only when data is available.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a use case where I need to make independent API calls simultaneously, but all of them depend on a query's result. Currently, I am doing something like the following. Curious if there is any better way to achieve this.
Since this is placed in a component and component could render multiple times using
useMemo
to generate queries. Otherwisequeries
will be generated every time the component renders. I didn't find theenabled
attribute helpful since queries are generated only whendata
is available.Beta Was this translation helpful? Give feedback.
All reactions