Interactive TanStack Query demos that focus on lazy/conditional fetching patterns in React.
This app demonstrates three ways to control when queries run:
enabled: false+refetch()for manual fetchingenabled: !!valuefor condition-based fetchingskipTokenfor declaratively skipping a query when inputs are missing
Each route includes:
- A small, runnable UI example
- Query state inspection to visualize status flags
- Practical behavior for loading, empty, and data states
/- landing page linking to all demos/manual-fetch- manual query trigger withrefetch()/conditional-query- query enabled only when input exists/skip-token-skipTokenpattern for optional query functions
pnpm install
pnpm devDefault dev server: http://localhost:3000
pnpm dev # Start local dev server
pnpm build # Build production bundle
pnpm preview # Preview production build locally
pnpm test # Run tests
pnpm lint # Run lint checks
pnpm lint:fix # Auto-fix lint issues
pnpm format # Format code
pnpm format:check # Check formatting only