← Back to all posts

Server Actions 101

/blog/server-actions-101

A Server Action is an async function marked "use server" that runs only on the server, but can be called directly from a form or a client event handler as if it were a normal function.

This page was generated by app/blog/[slug]/page.tsx— one file handling every post slug. Try changing the URL to a slug that doesn't exist to see notFound() trigger the nearest not-found.tsx(or Next's default 404) instead of crashing.