TanStackT
TanStack3mo ago
3 replies
primary-violet

Performance Question. useQuery in each component or pass the data in as a prop to each?

From a performance standpoint, if I have a list of 500 items that all need a big object that is in the query cache, is it better for me to have a useQuery call in each of the 500 components or have one call in the parent and pass the whole object as a prop to each of the 500 items.
Was this page helpful?