Nextjs Server Actions Just Got Better @DaveGrayTeachesCode
Nextjs Server Actions Just Got Better  @DaveGrayTeachesCode
Uploaded June 2024 | Updated November 2026, 13 hours ago
Web Dev Roadmap for Beginners (Free!): bit.ly/DaveGrayWebDevRoadmap

Nextjs server actions just got better with the library next-safe-action. In this video, I show the before and after code of a refactor with next-safe-action and how it helps clean up the code when using Next.js Server Actions.

💖 Support me on Patreon ➜ patreon.com/davegray

⭐ Become a full-stack web dev with Zero To Mastery Courses:
- Complete Next.js Developer: bit.ly/CompNextJSDev
- Advanced React: bit.ly/AdvReactDev
- Junior to Senior Dev Roadmap: bit.ly/WebDevRoadmap-JrtoSr

🚩 Subscribe ➜ bit.ly/3nGHmNn

📬 Course Updates ➜ https://courses.davegray.codes/

❓ Questions - Please post them to my Discord ➜ discord.gg/neKghyefqh

☕ Buy Me A Coffee ➜ buymeacoffee.com/davegray

🔗 Starter Source Code: github.com/gitdagray/nextjs-form-modal

🔗 Refactored Source Code: github.com/gitdagray/next-safe-action-example

🔗 My Next.js Videos: youtube.com/playlist?list=PL0Zuz27SZ-6Pk-QJIdGd1tGZEzy9RTgtj

👇 Follow Me On Social Media:
GitHub: github.com/gitdagray
Twitter: twitter.com/yesdavidgray
LinkedIn: linkedin.com/in/davidagray

Nextjs Server Actions Just Got Better with next-safe-action

(00:00) next-safe-action
(00:08) Before: Original Client-Side UserForm
(01:57) After: Refactored Client-Side UserForm
(05:53) Before: Original Server Action
(07:16) After: Refactored Server Action
(09:20) Set up for the actionClient
(10:04) Possible Drawbacks
(11:48) Wrap up

📺 Video References:
🔗 Next.js Form Modal: youtu.be/WyL_Jc6_-sY

📚 Tutorial References:
🔗 My Blog Post: https://www.davegray.codes/posts/nextjs-server-actions-with-next-safe-action
🔗 next-safe-action: https://next-safe-action.dev/
🔗 Next.js: nextjs.org
🔗 Next.js Server Actions: nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations
🔗 Zod: https://zod.dev/

Was this tutorial about refactoring your Next.js Server Actions with next-safe-action helpful? If so, please share. Let me know your thoughts in the comments.

#nextjs #server #actions
Nextjs Server Actions Just Got BetterNext.js Role-Based User Authorization & Access Control | Next Auth Protected RoutesDave Gray Live StreamReal Time Chat App with Users, Rooms | Node.js, Express, Socket.ioNext.js with React-Hook-Form, Drizzle-Zod, & ShadCN/ui | Nextjs Full Stack ProjectAI Wont Take Your Dev Job If You Have This Skill🤯 NEVER Guess React Event Types Again!Python Django Pages, URLs & SlugsReact Native Navigation with Expo RouterBEST Way to Get a Dev Job 🏆Build a Random Quote Machine with Nextjs, PlanetScale MySQL, & Drizzle ORMYoure Using Web Emojis Wrong! 😭
Dave Gray |

Nextjs Server Actions Just Got Better

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER