They just going mad out there. There is a library to fix the library in js to fix next... What the fuck is wrong with those guys!? Who can follow everything about new changes everyday!!!
Greetings friend thanks for the video.... Answering your question... What do you want to see in the following videos (12:50) Explanation of turborepo adding tailwind and schadcn/ui and if you can also add PRISMA or Drizzle with that we hit a home run. Greetings Jose Grillo from Venezuela
I need to check the latest on that. It is possible that TanStack is also handling server actions now. I should add the main emphasis here is the integration of Zod (or other validation if you want) so you don't have to handle all of that as I showed in the refactor. Last I checked, TanStack didn't directly integrate the validation step as shown here.
Hi Dave, Im a newbie. can you exaplin why we use server actions if we are using a external API, is it make a difference with react-query and this server actions
An external API might take a different approach. If I'm just fetching data and not mutating it, I would fetch directly from a server component if possible.
Dave I have a question I am having more than 2 years of exp but still I need to watch video before implementation anything new like useActionState new hook
Not the same. I should have emphasized the differences more. This implements Zod or other validation and abstracts away catching errors - no try/catch necessary. Also provides clearly defined error types. I'm going to do a follow up using toasts to show some additional patterns.
Any benefits over tanstack query? I am using server actions with useMutation from tanstack query right now, which has everything you need under the hood (error handling, loading states, etc.)
I think the emphasis here is on validation. This integrates well with zod or other validation libraries like valibot. I need to check the latest but last time I used React query, it wasn't handling all of this under the hood.
Hi Dave! I've been stuck on the trouble of having to display server error to client side. I just recently learned that in production, the server would change the error that was returned to client to a generic error message(I think this is not the issue when using action and useFormState instead of onSubmit). Should I use this on every form that uses react-hook-form and server actions? In a real world scenario, is it enough to just display a generic error message from the server? Whenever I want to do a mutation, I'm thinking of using the native form action before I switch to react-hook-form if my form is complex. Is this the right approach? Lastly, base from your experience, does it matter for UX if the error message is displayed when the form is submitted or on input blur/change.
There should be no problems displaying an error client side using what I show in this tutorial. I am going to do a follow-up to this with a toast message tutorial. There are several patterns that can be used. It won't just display a generic server message. As shown, you also get validation errors and fetch errors. You can modify the server error to show e.message so it can be very specific. I suggest sticking with react-hook-form and showing errors onBlur. It is a much preferred user experience.
at this point i'm disappointed now can make a full e-comm website with payment and everything also learn new tech from document. thanks to you . but the sad part is i did't earn a penny even now. Maybe i miss the part where you tech how to land or get hired or earn from web dev
Some channels focus on jobs, interviews, etc. I just focus on skills. The rest will happen if you develop skills. My top advice for getting a job is networking though. Make connections in the industry.
You can’t even imagine how huge the difference between tutorials and real world projects. I know it might be difficult to get hired but nowadays one’s priority shouldn’t be earning money. Minimum wage or even for free, it doesn’t matter. Just start working in a company where you can learn to overcome real world obstacles.
Thank you for your time and efforts that poured into the video.
Stay healthy
You're welcome!
No matter of the topic, I always have something to stay with you untill the end of the video. Great content as always! :)
Thank you!
I hope you get well soon.
Feel free to skip a week or two.
Thanks for the kind words!
I hope you are feeling better, Dave
Getting there!
❤. Your voice sounds different today boss.
Edited: get well soon sir.and be safe out there.
Yes I've been sick. Hope to be back to normal by next week
@@DaveGrayTeachesCode that's great to hear sir. Stay strong and jiggy sir. Wishing a quick recovery 🙏😊.
Thank you so much
You're most welcome!
Thanks Dave, this package helped me a lot, I would like to know how we can implement this for file type Inputs?
They just going mad out there. There is a library to fix the library in js to fix next... What the fuck is wrong with those guys!? Who can follow everything about new changes everyday!!!
no problem, our emotions change every day
Hope you get well soon. Your voice sounded different since the beginning of the video
Several days of coughing and congestion will do that. Getting better.
Greetings friend thanks for the video....
Answering your question... What do you want to see in the following videos (12:50)
Explanation of turborepo adding tailwind and schadcn/ui and if you can also add PRISMA or Drizzle with that we hit a home run.
Greetings Jose Grillo from Venezuela
Thank you for the suggestions Jose!
Been trying to do some unit tests on my server actions that use next, next-safe-actions and jest. No bueno for me. I’m kinda new at this …
this is looking to go a bit like the trpc way of doing things
Is there any benefits over tanstack query? If im not mistaken everything you showed is possible through use query
I need to check the latest on that. It is possible that TanStack is also handling server actions now. I should add the main emphasis here is the integration of Zod (or other validation if you want) so you don't have to handle all of that as I showed in the refactor. Last I checked, TanStack didn't directly integrate the validation step as shown here.
Hi Dave, Im a newbie. can you exaplin why we use server actions if we are using a external API, is it make a difference with react-query and this server actions
An external API might take a different approach. If I'm just fetching data and not mutating it, I would fetch directly from a server component if possible.
@@DaveGrayTeachesCode If we are fetching from a server component, this approach is better. am I correct?
@@dileepa-mn2to that is preferable when possible.
Dave I have a question I am having more than 2 years of exp but still I need to watch video before implementation anything new like useActionState new hook
Nothing wrong with that. I read docs, blogs and watch videos, too.
@@DaveGrayTeachesCode oh thanks Dave 💝
Doesn't "useActionState" from React do exactly that? Why a third party hook?
Not the same. I should have emphasized the differences more. This implements Zod or other validation and abstracts away catching errors - no try/catch necessary. Also provides clearly defined error types. I'm going to do a follow up using toasts to show some additional patterns.
Any benefits over tanstack query? I am using server actions with useMutation from tanstack query right now, which has everything you need under the hood (error handling, loading states, etc.)
I think the emphasis here is on validation. This integrates well with zod or other validation libraries like valibot. I need to check the latest but last time I used React query, it wasn't handling all of this under the hood.
@@DaveGrayTeachesCode Got it. Definitely recommend checking it out. Hope to see the video from you!
Hi Dave! I've been stuck on the trouble of having to display server error to client side. I just recently learned that in production, the server would change the error that was returned to client to a generic error message(I think this is not the issue when using action and useFormState instead of onSubmit). Should I use this on every form that uses react-hook-form and server actions? In a real world scenario, is it enough to just display a generic error message from the server? Whenever I want to do a mutation, I'm thinking of using the native form action before I switch to react-hook-form if my form is complex. Is this the right approach? Lastly, base from your experience, does it matter for UX if the error message is displayed when the form is submitted or on input blur/change.
There should be no problems displaying an error client side using what I show in this tutorial. I am going to do a follow-up to this with a toast message tutorial. There are several patterns that can be used. It won't just display a generic server message. As shown, you also get validation errors and fetch errors. You can modify the server error to show e.message so it can be very specific. I suggest sticking with react-hook-form and showing errors onBlur. It is a much preferred user experience.
same here, I am not able to get the error on to the client side, we can throw the generic error but returning an specific error is not working
@@KkrDs97 Why would you do that? If you are using React Hook Form on the client side, you are already displaying errors to the user.
at this point i'm disappointed now can make a full e-comm website with payment and everything also learn new tech from document. thanks to you . but the sad part is i did't earn a penny even now. Maybe i miss the part where you tech how to land or get hired or earn from web dev
that's what happens if you're in this field just for the money, instead of passion.
Some channels focus on jobs, interviews, etc. I just focus on skills. The rest will happen if you develop skills. My top advice for getting a job is networking though. Make connections in the industry.
You can’t even imagine how huge the difference between tutorials and real world projects. I know it might be difficult to get hired but nowadays one’s priority shouldn’t be earning money. Minimum wage or even for free, it doesn’t matter. Just start working in a company where you can learn to overcome real world obstacles.
thank you so much
You're welcome!