Command Palette

Search for a command to run...

React Server Actions: Mental Model and Gotchas

3/1/2025 • 1 min read

notesreactnextjsserver-actions

Server Actions let you mutate data from the client without wiring an API route.

Remember: they run on the server, and only accept serializable inputs like FormData.

Gotchas

- Don't pass functions or class instances

- Use revalidatePath after writes

- Use Zod on the server to validate inputs