React Query: Initial Data ⚡️
6 min readMay 16, 2023
Avoid refetching expensive queries by feeding sub-queries with initial data.
This article will be helpful for you if: you have an expensive index query, i.e., a list of items coming from a costly endpoint; and you want to break it down into multiple sub-queries to be able to invalidate items independently and avoid re-fetching the expensive query.