data-fetching

Next.js data fetching - Server actions, caching, revalidation

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "data-fetching" with this command: npx skills add pluginagentmarketplace/custom-plugin-nextjs/pluginagentmarketplace-custom-plugin-nextjs-data-fetching

Data Fetching Skill

Overview

Modern data fetching in Next.js with server actions, caching strategies, and revalidation.

Capabilities

  • Server Actions: 'use server' for mutations
  • Caching: Automatic request memoization
  • Revalidation: Time-based and on-demand
  • Streaming: Progressive rendering
  • Parallel Fetching: Promise.all patterns

Examples

// Server Action
'use server'

export async function createPost(formData: FormData) {
  const title = formData.get('title')
  await db.posts.create({ title })
  revalidatePath('/posts')
}

// Data fetching with caching
async function getData() {
  const res = await fetch('https://api.example.com/data', {
    next: { revalidate: 3600 } // Revalidate every hour
  })
  return res.json()
}

Caching Options

  • cache: 'force-cache' - Default, cached
  • cache: 'no-store' - No caching
  • next: { revalidate: N } - Revalidate after N seconds

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

deployment

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

app-router

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

api-routes

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

java-spring-boot

No summary provided by upstream source.

Repository SourceNeeds Review