GifproGifpro

TanStack Query v5 Cache Deep Dive – AI-Generated Demo

CODE PREVIEW

エディタを読み込み中…
P

Prompt

Create a single HTML file that demonstrates TanStack Query v5 caching behavior with a code example and interactive demo. Include Swiper for sliding between explanation cards, GSAP for animations, and AOS for scroll effects. Show staleTime, gcTime, cache invalidation, and refetchOnMount vs. refetchOnWindowFocus.

TanStack Query v5のキャッシュ動作を実際のReactコードでデモします。「データ取得」ボタンでデータを読み込み、キャッシュ状態を確認。staleTimeは30秒、gcTimeは5分に設定。キャッシュ無効化で再取得を強制。スワイプでコアコンセプトを確認。

Prompt Overview

This demo showcases TanStack Query v5 cache behavior using real React code. Click the "Fetch Data" button to load data and observe the cache state. staleTime is set to 30 seconds, gcTime to 5 minutes. Invalidate the cache to force a refetch. Swipe to review core concepts.

Was this prompt helpful?

Comments

Comments appear after moderation

この記事が役に立ったら投げ銭で応援

Apple Pay / Google Pay / カード (Visa/Mastercard/JCB/Amex) / Link / Alipay / WeChat Pay 対応 · Stripeで安全に決済

開発者が選ぶ最強ツール集

運営者が毎日使っているツール・ガジェット 6選

見る
Homeヘルプ
TanStack Query v5 Cache Deep Dive – AI-Generated Demo | ギフプロ | ギフプロ