This Is The Way.. Next.js Server Actions with next-safe-action & Sentry
Dave Gray
0:00 / 0:00
This Is The Way.. Next.js Server Actions with next-safe-action & Sentry
10 218 просмотров · 1 год назад
Dave Gray
445 тыс. подписчиков
10 218 просмотров · 1 год назад
Learn an outstanding pattern for Next.js server actions with next-safe-action and Sentry. You will create type-safe server actions with built-in error handling and detailed error logs. This is the way!
⭐ Use the code "davegray" for 3 months free on the Team plan of Sentry for any new accounts:
Sentry Homepage: https://bit.ly/sentry-dg
Sentry Sign-up: https://bit.ly/try-sentry-dg
Sentry Next.js: https://bit.ly/sentry-nextjs-dg
Sentry Next.js Docs: https://bit.ly/sentry-docs-dg
🔥 Neon Postgres: https://fyi.neon.tech/davegray
🔒 Kinde Auth: https://kinde.com/dgray-nextjsstack/
👉 Web Dev Roadmap for Beginners (Free!): https://bit.ly/DaveGrayWebDevRoadmap
💖 Support me on Patreon ➜ / davegray
🚩 Subscribe ➜ https://bit.ly/3nGHmNn
📬 Course Updates ➜ https://courses.davegray.codes/
❓ Ask Questions & Discuss on Discord ➜ / discord
☕ Buy Me A Coffee ➜ https://www.buymeacoffee.com/davegray
🔗 Next.js Full Stack Project playlist: • Next.js Full Stack Project with Nextjs 15 ...
👇 Follow Me On Social Media:
GitHub: https://github.com/gitdagray
Twitter: / yesdavidgray
LinkedIn: / davidagray
🔗 Course Resources: https://github.com/gitdagray/nextjs-f...
This Is The Way.. Next.js Server Actions with next-safe-action & Sentry
(0:00:00) Intro
(0:01:03) Tech Stack
(0:01:23) User Stories Checklist
(0:03:03) Installing next-safe-action
(0:05:17) Create the Safe Action Client
(0:13:26) saveCustomerAction
(0:33:00) useAction hook
(0:37:49) ShadCN toast notifications
(0:42:39) Display feedback from useAction
(0:55:53) Testing the server action
(1:05:50) Viewing errors in Sentry
(1:09:19) saveTicketAction
(1:16:16) useAction in Ticket Form
(1:20:28) Testing the Ticket Form
(1:22:17) Final Additions
📚 Tutorial References:
🔗 Next.js: https://nextjs.org/
🔗 ShadCN/ui: https://ui.shadcn.com/
🔗 Sentry Next.js: https://bit.ly/sentry-nextjs-dg
🔗 Tailwind CSS: https://tailwindcss.com/
🔗 TypeScript: https://www.typescriptlang.org/
🔗 Drizzle ORM: https://orm.drizzle.team/
🔗 Neon Postgres: https://fyi.neon.tech/davegray
🔗 Kinde Auth: https://kinde.com/dgray-nextjsstack/
🔗 next-safe-action: https://next-safe-action.dev/
Was this Next.js server actions tutorial with next-safe-action and Sentry helpful? If so, please share. Let me know your thoughts in the comments.
#nextjs #server #actions