Replies: 1 comment 1 reply
-
I agree with this one, as it would make the behaviour similar to Probably having a Let's say we want to combine multiple results, but in different situations we would like to still reuse the same |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
According to documentation, the way to reduce re-renders with
useQuery
is to use a referentially stableselect
option that will then be memoized.With
useQueries
there is noselect
option, but acombine
which functionally is essentially the same. However even if it returns a referentially equal result it will still cause a re-render every time a dependent query is updated. This means there is no convenient way to optimise queries with many dependencies. IMHO it would be preferable if only instances where the combined result changed would cause rerenders.Related: #7233
Example/reproduction: https://stackblitz.com/edit/vite-react-ts-jnyua9?file=src%2FApp.tsx
Beta Was this translation helpful? Give feedback.
All reactions