Next.js 14 - Server Actions TUTORIAL | Type Safety, Error Handling, Pending States
Vložit
- čas přidán 14. 01. 2024
- Getting close to finishing the Next 14 Course, stay tuned for the update.
developedbyed.com/
Resources ⛏️
nextjs.org/docs/app/building-...
github.com/TheEdoRan/next-saf...
🛴 Follow me on:
Twitter: / developedbyed
Github: github.com/developedbyed/
Dope tracks 🔥
Shofel - Balcony chll.to/8d7e18be
#react #nextjs - Věda a technologie
Thank you so much Ed for featuring next-safe-action! Very glad you find it useful.
Let me know if you want me to make a demo for optimistic updates as well 👍👍
AM YOUR BIGGEST FUN , THANK YOU GUIDANCE IN MY WEBDEV JOURNEY
please show us the way
Yes please
Yes yes yes
Yes
Hey there ED That's fantastic news! I'm really happy to hear that you found this project helpful. It's always a good idea to have server actions that prioritize type safety and error handling. I must say, the demonstrations you shared are really informative and highlight some key aspects of server actions. It's great to see that Next.js 14 is bringing in some handy features to manage loading, errors, and success. Thank you so much for sharing this valuable information!
Glad to see you back! Saw you switch from tRPC to Server Actions in your repo. Is it due to the "experimental" stage of tRPC with server side calls?
Welcome back Ed!
waiting for the course!!
thanks, for introducing new packages. 👍
I hope you are well Ed
thank you very much ed! :) you explained it so well, now i'm getting this rocked. thanks
Rock on!
I've really been struggling with the prettier endlessly loading 11:08. Have you found a fix. I pruned unnecessary extensions and other things thinking there was too many extensions but it still happens often.
When will your next14 course be published?❤
Give it a shot work for heroine too, that's a double, nice shot
Please make a full playlist of NextJS 14~!
hello one question about min 6:15 , in my app the values look like this: type Ingredient = {
name: string;
purchasePrice: Prisma.Decimal;
}
and I'm having an error ("Only plain objects can be passed to Server Functions"), so I have to to do addIngredient(JSON.stringify(values)) in the onSubmit.
and in the definition of the action, undo by doing JSON.parse(ingredientData).
how would you deal with that without any additional package?
Sir is possible to fetch API from external in server action? I always got status code 303 even its succesed
Any idea why I might keep getting a fetch error when using `next-safe-action` saying "TypeError: Cannot redefine property: $$id". Works fine doing a raw db.insert without next-safe-action
Amazing thank u Deved
yeah no worries! always around 👍
@@developedbyed and we are always here to see what you bring us, in Deved we trust. 😁
What's the benefit using server actions over API?
great one
HE'S BAAACK!!!!!
I'm new to nextjs, consider me dumb. Even we don't write 'use server' on top of the file , it automatically becomes a server thing? like we only need to decalre 'use client' if it's a client component, otherwise it's a server thing by default?
yes next js components are server components by default use the 'use server' when writing server actions not components server actions are just like functions which interact with the db directly without apis
AWSEMOE !!
Can you please provide the source code of last product adding form shown in this video...?
Can you make a video of how to do shadcn without typescript and nextjs?
My body is still ready
Can you drop the repo? :)
what is the difference between this method vs using react query?
react query is used for apis and next-safe actions is used for server actions, they pretty much work the same though
@@dwin9983web dev field is a mess, glad I moved away from it. Those mf keep reinventing wheel over and over again 😅
Server actions are more advantageous right ?@@dwin9983
Where is the code links?
Make a lot next js project
SECIND ONE HERE
Hey I got a challange for you, (Actually I faced the same & no anyware to go 😭 😂),
Need to build a login & perform Remember me using access Token & Refresh Token which is provided by third-party backend server
Use:
Next Js (App directory: latest)
Next-Auth
You need to start using Prisma for database with postgres.
Prefer drizzle over prisma 😊
can you sponser me two 8gb ddr4 ram vscode can keep up
WOW
Source code?
8:35
Can someone please vacuum his mic pop filter? 🤣
so many packages. would prefer long(er) lines of code rather than using lots of packages. IMO.
Can i watch it without getting drunk?
Man you are being lazy, people are waiting for your videos, including me 😅
I hope you are well Ed