1 min read
React Query in Small Apps
Why cache boundaries still matter, even when the product looks simple.
ReactEngineeringData
Small apps still have real data problems. Weather fails. APIs rate-limit. A user switches tabs and comes back later. The app has to decide what is fresh, what can be reused, and what deserves a retry.
React Query gives that decision a home.
Cache as Product Behavior
Caching is not only an optimization. It is a product decision. A status widget might need to refetch every minute, while a location label can stay stable for an hour.
Those choices make the interface feel intentional.
const query = queryOptions({
queryKey: ["home", "status"],
staleTime: 60 * 1000,
});
When data fetching is explicit, loading and empty states become easier to design too.