بنقرة واحدة
data-fetching
Next.js data fetching - Server actions, caching, revalidation
القائمة
Next.js data fetching - Server actions, caching, revalidation
Next.js API Routes - Route handlers, middleware, edge runtime
Next.js App Router - Server components, layouts, routing patterns
Next.js deployment - Vercel, Docker, self-hosting strategies
Master system design, architecture patterns, algorithms, data structures, and computer science fundamentals for building scalable systems.
Master Node.js, Express, PHP, Laravel, Java, Spring Boot, API design, and database integration. Build scalable APIs and server applications.
Master machine learning, data engineering, AI engineering, LLMs, prompt engineering, and MLOps. Build intelligent systems with Python.
| name | data-fetching |
| description | Next.js data fetching - Server actions, caching, revalidation |
| sasmp_version | 1.3.0 |
| bonded_agent | nextjs-expert |
| bond_type | PRIMARY_BOND |
Modern data fetching in Next.js with server actions, caching strategies, and revalidation.
// 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()
}
cache: 'force-cache' - Default, cachedcache: 'no-store' - No cachingnext: { revalidate: N } - Revalidate after N seconds