React Query: Initial Data ⚡️

Flavio Wuensche
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.

Problem

--

--

Flavio Wuensche

Building an open-source tool to keep track of technical debt on large codebases 🍒 cherrypush.com