Individual skill
react-fetch-cache-patterns
React data-fetching patterns at scale — recommender carousels, infinite feeds, pages with many parallel fetches, dashboards. Covers request orchestration (parallelism, batching, deduplication), cache strategy (keys, normalization, staleTime, SWR), backend protection (concurrency caps, debounce/throttle, jittered retries, circuit breakers), prefetching (route loaders, hover/intent, idle, server hydration), failure resilience (AbortController, timeouts, error boundaries, stale fallback, idempotent mutations), and feed/carousel patterns (virtualization, cursor pagination, summary/detail split). Includes 5 ready-to-use scaffolding templates (resource query hook, carousel data loader, infinite feed, hover-prefetch link, request collapser). Trigger when building, reviewing, or refactoring React components that fetch data — even if the user doesn't explicitly mention "performance" or "scale".
skills/.experimental/react-fetch-cache-patterns/SKILL.md
Source commit cf93c57cac89d6fc3e4194686000411567f5caf3
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- Yes
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Network or broad shell
- Last checked
- Nov 5, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 222
- Repository last updated
- Aug 15, 2026
- License
- MIT
Observed agent integration: codex
- data Derived category
- engineering Derived category
- engineering-web Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
AGENTS.mddoc · 11,913 bytesSKILL.mdcore · 11,943 bytesSKILL.mdcore · 11,943 bytesassets/templates/_template.mddoc · 2,402 bytesassets/templates/carousel-data-loader.template.tsxruns · 14,184 bytesassets/templates/infinite-feed.template.tsxruns · 6,277 bytesassets/templates/prefetch-link.template.tsxruns · 3,278 bytesassets/templates/request-collapser.template.tsruns · 5,710 bytesassets/templates/use-resource-query-no-deps.template.tsxruns · 14,673 bytesassets/templates/use-resource-query.template.tsxruns · 8,714 bytesmetadata.jsonasset · 2,454 bytesreferences/_sections.mddoc · 5,431 bytesreferences/cache-deterministic-keys.mddoc · 2,689 bytesreferences/cache-normalize-shared-entities.mddoc · 2,985 bytesreferences/cache-select-subscribed-fields.mddoc · 2,435 bytesreferences/cache-set-stale-time.mddoc · 2,540 bytesreferences/cache-shared-key-factory.mddoc · 2,554 bytesreferences/cache-stale-while-revalidate.mddoc · 2,698 bytesreferences/cache-tiered-stale-fresh.mddoc · 2,447 bytesreferences/feed-bounded-working-set.mddoc · 4,103 bytesreferences/feed-cursor-pagination.mddoc · 3,687 bytesreferences/feed-image-lazy-and-sized.mddoc · 3,427 bytesreferences/feed-multi-carousel-isolation.mddoc · 6,921 bytesreferences/feed-split-summary-from-detail.mddoc · 4,203 bytesreferences/feed-stable-keys-across-pages.mddoc · 3,053 bytesreferences/feed-virtualize-long-lists.mddoc · 3,487 bytesreferences/mutate-cancel-queries-on-mutate.mddoc · 3,754 bytesreferences/mutate-optimistic-updates-with-rollback.mddoc · 4,130 bytesreferences/mutate-set-data-over-invalidate.mddoc · 3,860 bytesreferences/mutate-surgical-invalidation.mddoc · 3,888 bytesreferences/orch-avoid-effect-chains.mddoc · 2,321 bytesreferences/orch-batch-n-plus-one-fanout.mddoc · 2,227 bytesreferences/orch-dedupe-in-flight-requests.mddoc · 2,369 bytesreferences/orch-lift-fetch-to-route-loader.mddoc · 2,560 bytesreferences/orch-parallelize-independent-fetches.mddoc · 2,131 bytesreferences/orch-prefer-bulk-endpoint-for-fanout.mddoc · 2,257 bytesreferences/orch-server-fetch-when-possible.mddoc · 2,328 bytesreferences/prefetch-budget-and-priority.mddoc · 3,346 bytesreferences/prefetch-hover-intent-links.mddoc · 2,664 bytesreferences/prefetch-hydrate-server-cache.mddoc · 3,542 bytesreferences/prefetch-idle-likely-next.mddoc · 3,215 bytesreferences/prefetch-parallel-loader-queries.mddoc · 3,658 bytesreferences/prefetch-viewport-triggered-next-page.mddoc · 3,412 bytesreferences/protect-circuit-breaker.mddoc · 3,006 bytesreferences/protect-collapse-identical-requests.mddoc · 4,406 bytesreferences/protect-concurrency-limit-fanout.mddoc · 2,528 bytesreferences/protect-debounce-user-driven-fetches.mddoc · 2,530 bytesreferences/protect-jittered-retry-backoff.mddoc · 2,772 bytesreferences/protect-rate-limit-aware-client.mddoc · 3,089 bytesreferences/protect-throttle-scroll-triggered.mddoc · 3,038 bytesreferences/render-cap-fanout-in-lists.mddoc · 3,937 bytesreferences/render-colocate-fetch-with-consumer.mddoc · 3,893 bytesreferences/render-stable-query-keys.mddoc · 3,690 bytesreferences/render-suspense-per-section.mddoc · 4,098 bytesreferences/resilience-abort-on-unmount.mddoc · 3,095 bytesreferences/resilience-bounded-timeouts.mddoc · 3,504 bytesreferences/resilience-graceful-degradation.mddoc · 3,861 bytesreferences/resilience-no-auto-retry-mutations.mddoc · 3,748 bytesreferences/resilience-scoped-error-boundaries.mddoc · 3,348 bytesreferences/resilience-stale-fallback.mddoc · 3,454 bytes
Read excerpt
# Experimental React Data Fetching & Caching Best Practices
Implementation patterns for React applications that fetch and cache many API requests without overwhelming the backend. **48 rules across 8 categories**, ordered by execution lifecycle impact — earlier categories cascade through everything downstream. Templates show both library-based (TanStack Query, SWR) **and library-free** (pure React + AbortController) implementations so the patterns are usable regardless of stack constraints.
## When to Apply
- Writing or reviewing a React component that calls `fetch`, `useQuery`, `useSWR`, or any data-fetching hook
- Designing a list, feed, or carousel that displays many items each requiring data
- Investigating "the backend is getting hammered" or "the page loads slowly" symptoms
- Choosing between client-side fetching, route loaders, server components, or SSR
- Implementing prefetch, retry, optimistic updates, or any failure-handling logic
- Refactoring code that already does data fetching but with waterfalls, no cache strategy, or no concurrency limits
## Rule Categories by Priority