Skip to content
Back to skills

Handling Data Fetching

ASecurity

Strategy for fetching data using React Server Components (RSC) and managing cache. Use for initial page loads and SEO-optimized data.

  • 666 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added February 8, 2026
developmenttypescriptreact

Works with

  • cli

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill handling-data-fetching --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Handling Data Fetching?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Handling Data Fetching
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-handling-data-fetching/badge)](https://www.skillsdirectory.com/skills/majiayu000-handling-data-fetching)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: handling-data-fetching
description: Strategy for fetching data using React Server Components (RSC) and managing cache. Use for initial page loads and SEO-optimized data.
---

# Data Fetching and Caching

## When to use this skill
- When building pages that need SEO (Tours, Details).
- When deciding between RSC and Client-side `useEffect`.

## Strategy
- **RSC (Default)**: Fetch data in Server Components for speed and SEO.
- **Client Fetching**: Use only for highly interactive, private, or real-time data.
- **No-store**: Use `cache: 'no-store'` or `dynamic = 'force-dynamic'` for frequently changing data (like live availability).

## Implementation (RSC)
```typescript
import { TourService } from '@/services/tours';

export default async function ToursPage() {
    const tours = await TourService.getAll();
    
    return (
        <div>
            {tours.documents.map(tour => <TourCard key={tour.$id} tour={tour} />)}
        </div>
    );
}
```

## Instructions
- **Type Safety**: Await findings and pass typed objects to child components.
- **Suspense**: Always wrap RSC data-fetching segments in `Suspense` for better UX.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.