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 useMemo6 Replies
ratty-blushOP•14mo ago
vs
adverse-sapphire•14mo ago
results is a new reference in each render so the second one doesn't work
ratty-blushOP•14mo ago
okay, what about
adverse-sapphire•14mo 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?
ratty-blushOP•14mo 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?adverse-sapphire•14mo ago
No, the top level one is always a new object