Server Action
إجراء الخادم
GLS-000008
Intermediatenextjs1 min read
use serverserver functions
Definition
Async functions marked with 'use server' that run on the server, callable from client components.
دوال غير متزامنة مُعلَّمة بـ 'use server' تعمل على الخادم ويمكن استدعاؤها من مكونات العميل.
Full Definition
Server Actions are async functions that execute on the Next.js server. They are marked with the 'use server' directive and can be called directly from client components without needing a separate API endpoint. They enable form submissions, database mutations, and other server-side operations from the client.
Server Actions هي دوال غير متزامنة تعمل على خادم Next.js. تُعلَّم بتوجيه 'use server' ويمكن استدعاؤها مباشرة من مكونات العميل دون الحاجة إلى نقطة API منفصلة.
Knowledge Graph
AI Builder Tips
No documented mistakes for Server Action yet. Check related AI rules for usage guidelines.
Sign in to unlock guided AI explanations from AI Teacher.
Generate a Prompt
Copy this prompt and use it directly with any AI model — no setup needed.
Ready-to-Use Prompt
Help me build a project using Server Action. Explain: 1. What is Server Action and why it matters 2. The core architecture and required tools 3. Step-by-step implementation plan 4. Common mistakes to avoid 5. Best practices and production tips
Official Resources
No official documentation link on file for Server Action yet.