👉 NEW React & Next.js Course: bytegrad.com/courses/professional-react-nextjs
@naylord5
6 ай бұрын
Thank God I found your channel, the content is pure gold. Thank you so much for sharing your knowledge with the community! Cheers mate! 🍻
@ByteGrad
6 ай бұрын
Much appreciated!
@nsshing
11 ай бұрын
This approach is mind blown. I didn't think about having the server actions in a sperate functions in the page. Great video! Saved my day!
@editdev
Жыл бұрын
thank you! i was using throw new Error() from the server component and it worked locally, then broke as soon as I deployed it. This is a much better way of handling errors 👍
@alanwilliamduarte5617
Жыл бұрын
thank you so so much for this, i was completly lost and thought I would have to use client components for absolutely everything. Thanks for this video
5 ай бұрын
Greatest explanation about error handling in React and Toasts! Thanks a lot!!
@investandcyclecheap4890
10 ай бұрын
Great video! I stumbled across this video because I wanted to show messages to the client from my server actions. There is not much out there right now for how to handle situations like these, so thanks for sharing!
@joaobebber
6 ай бұрын
Came here from Brazil! You helped me too much, thanks a lot! 🎉
@dog4ik
Жыл бұрын
Wow that really sucks, we need to be able to handle errors in catch block of server action
@ofwoodfalegnameria1107
4 ай бұрын
Like always the most comphrensive tutorial in the web. Tanks a lot
@LeeWalpole
7 ай бұрын
Your content is bang on every time. Perfect pace and crystal clear! Thanks so much. This way is leagues better than the version ChatGPT suggested 🙏
@aurorasofie
Жыл бұрын
Love your tutorials. Using them alot while learning next 13. You deserve more subs!
@HarshitPrasad-n8e
8 ай бұрын
yet another informative and detailed solution. Thanks a bunch
@dawid_dahl
10 ай бұрын
Thank you so much! Will most probably use this in my production app at work.
@hydrognspa8753
4 ай бұрын
Ok. I'll hit that subscribe button. You totally deserve it :')
@weichen3994
10 ай бұрын
exactly what i was looking for ty!
@santiskiffa
3 ай бұрын
great video, love it ! am really struggling with specific field erros (using Zod for example 'hours cannot be zero'). vs more generic errors ('this client already exists in db'). how to return errors what to do on the client side and what on the server .. how to reset the errors . if there can ever be a video on that it would save me :)
@amershboul9107
3 ай бұрын
oh mannn!! you're the best!!
@umernasir4217
8 ай бұрын
Great Content!
@ГлебЗикунов-ъ1з
9 ай бұрын
Thanks a lot!
@hongz1
5 ай бұрын
Nextjs dev team needs to add special return command syntax so that there won’t be “consistent return” eslint error.
@manoval1000
9 ай бұрын
this is gold
@kevinpruett
Жыл бұрын
Great work
@codinginflow
9 ай бұрын
React's useFormState hook is kind of a shorthand to do the same thing
@ByteGrad
9 ай бұрын
True, I published this video before that hook came on the scene. Still, that hook has quite some boilerplate / confusing way of working IMHO
@codinginflow
9 ай бұрын
@@ByteGrad I see! I like your videos, keep it up!
@kayodionizio2886
7 ай бұрын
Useful!!!!
@vignesh_m_1995
4 ай бұрын
For Client Side Validation, we get the FormData only during Submit (inside the action). What if we need to do the validation immediately while updating a text field (blur)?? Storing the form fields in the local component state becomes necessary right. Also other features like for pre-filling the form on load showing the fields below based on a dropdown selection needs the data to be stored on the local state like the usual react component right?. Or is that any other way for it?
@tarunkhubchandani5869
Ай бұрын
Sir, error boundary (error.jsx) doesn't catch errors occuring in event handlers invoking server actions in client components ?
@stephenpaul7499
7 ай бұрын
Thanks for the video :) Is there a way to have a global error handler set up to handle all server action errors? I tried an ErrorBoundary in a component marked with "use client" but was unsuccessful.
@aymenbachiri-yh2hd
2 ай бұрын
thank you so much
@liu-river
Жыл бұрын
How do I do this if I want to use the transition hook? I can't seem to get the response on client side from my server action.
@liu-river
Жыл бұрын
Nevermind, I figured it out, I can get the error inside the startTransition callback.
@ПетрКраснопир
6 ай бұрын
Why we need return error from server action catch? Can we use try catch in clientAction handler, and do all the same, but in catch, not in result.error condition?
@alexlykesas9733
4 ай бұрын
I was wondering, Why not throw the error? and handle it with try catch?
@Milotiiic
8 ай бұрын
What if your app has several languajes? you can't just get the message from the error because it will always be in english, or worse: you may be displaying weird errors to the client like "unexpected < in JSON" or the typical "whatever is not a function"
@codedusting
3 ай бұрын
This whole react-server-component fails totally the moment it meets the real world. It's nothing but a bad DX with no improvements whatsoever. What exactly do we achieve with this pattern when the client-side JS is anyways being shipped the moment we do "use client"?
Пікірлер: 43