Why this matters
Reduces client code, improves DX, and keeps cache consistent.
For simple form submissions from RSC, use server actions with schema validation and then revalidate paths/tags. Avoid client fetch for trivial mutations.
Reduces client code, improves DX, and keeps cache consistent.
Side-by-side examples engineers can pattern-match during review.
'use client'
async function handleSubmit(){ await fetch('/api/todos',{ method:'POST', body:JSON.stringify({ title }) }) }'use server'
export async function createTodo(prev, formData){ const title = String(formData.get('title')||'').trim(); if(!title) return { error:'Title required' }; await db.todo.create({ title }); revalidatePath('/todos') }Client-side fetch to create a simple itemServer action + revalidatePathFrom the same buckets as this rule.