Jul 3, 2026·8 min read·Engineering

React Query is good software. But good software is not automatically the right dependency for a product. On one project, a plain fetch layer with a small cache removed more complexity than it added.

The app had a handful of screens, each loading one or two resources. Data changed rarely. There was no optimistic updating, infinite scrolling, or complicated invalidation. None of the features that would justify a data-fetching library were present.

The solution was a module that owned fetching, a small in-memory cache with a TTL, and one way to invalidate by key. Roughly forty lines:

export const cache = new Map();
export async function load(key, loader, { ttl = 60_000 } = {}) {
  const hit = cache.get(key);
  if (hit && Date.now() - hit.at < ttl) return hit.data;
  const data = await loader();
  cache.set(key, { data, at: Date.now() });
  return data;
}
export function invalidate(key) { cache.delete(key); }

There were fewer concepts to teach, no upgrade treadmill, and no new bundle weight. The team could read the whole data layer in one sitting. For this product, that was the point.

Popularity is a signal about the ecosystem, not a verdict about your codebase. Choose a dependency for the features you need now, not the ones you might need someday.

Is the stack slowing the product down?