CLEANEST Way to write Next.js Server Actions ✨

preview_player
Показать описание

🔗 Links:

--

Chapters:
00:00 - Intro
00:18 - Defining Procedures
02:02 - Defining Actions with Input Validation
04:19 - Invoking Actions from the Client
07:26 - Chaining Procedures
10:35 - Docs
11:21 - Outro
Рекомендации по теме
Комментарии
Автор

Amazing Videos for me to learn. I hope you make many more

chrschoeni
Автор

Amazing video, Lazar. One thing I noticed is, you are very comfortable working with NeoVim, but as someone like me who have never tried it, it is kinda confusing. Do you have a plan to record your videos using Vscode?

finetopethiopia
Автор

Cool! Thank you for sharing such nice approach!

zakir.nuriiev
Автор

What are your thoughts on next safe actions?

HarisVFX
Автор

What’s the advantage of zsa over something like next-safe-action?

semyaza
Автор

Hey Lazar, thanks a lot! Would you recommend using clean architecture infrastructure over the Server actions/ZSA approach? Or would using both be overkill? ZSA procedures already doing the controller job right? (Not to mention the fact that the framework is not decoupled from the interface layer)

I need to expose my HTTP API, so I dlike to share the controllers functions/ZSA actions with both the HTTP API route handler and client components. Is it considered good practice to call ZSA actions from the API route handler? I also looked into IRPC, but I'm a bit lost. Is IRPC obsolete with server actions + ZSA/next-safe-action?

Thank you so much for your help!

loic
Автор

I know this video wasn't about form validation. But I couldnt see rhe part where live client side validations were used from the zodschema with react hook form.

Is there another video where you show us how client side validation with live errors are shown to the user?

AmitErandole
Автор

Hi all I try zsa but request is still show in network and I can see the payload. It's the same in the zsa documentation. I though request are made on the server side. I'm using react not nextjs

warisaremou
Автор

Thanks for the content! Can I clarify if it's possible to make a solid background without the light spot in the future? For some reason it's hard to read because of it

bibblebabl
Автор

Hey! Your videos really interested me on clean architecture. Do you recommend any books on that topic?

InekMarcinek
Автор

Have you tried next safe action btw? What is the difference?

bibblebabl
Автор

So basically zsa is trpc but for server actions 😅

besuccessfull
Автор

It's very good I think, but why not separate the supabase logic in usecases for example, so that if you have to change bd or provider you won't need to touch your server actions which are already well structured

cabrelelvis
Автор

Hi buddy, could you provide your nvim config? It's pretty cool

interceptorghost
Автор

Simply don't write serious backend code with server actions. Anything beyond basic usage will end up in a messy unmaintainable code.

Next.js isn't suitable for a scalable backend application. Imagine doing RBAC, rate limiting, metering, heavy middleware actions, and load balancing with server actions or the route.js/ts setup.

aberba
Автор

Cool to know but man too much work, also I love how server actions turning into trpc slowly 😂

blazi_
Автор

no way, brother where are the videos of the expense tracker app

Michelbouf
Автор

I don't understand why you would do all of this. The NextJS documentation already shows best practices for using server actions

clickbaitpolice