useQueries({ combine: ... }) vs useMemo
Is there any advantage to using
combine
in useQueries
vs taking all the query results and passing into useMemo
to "reduce" results down?
Seems like since we lose the nuance of each query in combine
, we'd get the ~same effect with a useMemo
6 Replies
extended-salmonOP•11mo ago
vs
wise-white•11mo ago
results is a new reference in each render so the second one doesn't work
extended-salmonOP•11mo ago
okay, what about
wise-white•11mo ago
What's result1 and result2?
Anyway we made combine to give you an easier way to do this. What problems do you have with combine?
extended-salmonOP•11mo ago
just wanted to confirm my understanding
doesn't feel like it reduces complexity or provide enough value to justify it over
useMemo
, which is clearer to me + more powerful
I am assuming useQuery
returns a stable reference?wise-white•11mo ago
No, the top level one is always a new object