implementing-server-actions
Installation
SKILL.md
Server Actions
Server Actions are async functions executed on the server, callable from Client Components.
Key Concepts
Defining Server Actions:
'use server';
export async function createUser(formData) {
const name = formData.get('name');
const email = formData.get('email');
const user = await db.users.create({ name, email });
return { success: true, userId: user.id };
}