v10 useQueries does not return a stable reference
I though this code would work downstream for memos and callbacks, but it does not. The memo and effect are re-ran every render.
Have I don't something stupid, here or is this intended? How would I memoize a derives values from the results?
This code:
Logs this:
1 Reply
This does work, which means the
data
prop is stable
but I'm not seeing how to get a stable array of the data objects themselves
I guess trpc v11 and tanstack query v5 fix this with the combine
option. Maybe I should focus on being able to upgrade instead
Ended up with
Which feels like a bit of a hack, but it seems to work.