Next.js Server Actions (revalidatePath, useFormStatus & useOptimistic)
ByteGrad
@bytegradAbout
Hi, I'm Wesley. I'm a brand ambassador for Kinde (paid sponsorship). My COMPLETE React & Next.js course is out now! Find it here: https://bytegrad.com/courses/professional-react-nextjs It's the #1 resource to master the latest React & Next.js. I'm very proud of it, my best work! Interested in sponsoring me? I love working with sponsors. Please email me here: [email protected] Note that my videos may contain mistakes. Always verify yourself that your code is safe and does what you want it to do for your specific situation. You agree by watching the videos that you are solely responsible for any mistakes in your code. This channel and all its content is owned & operated by ByteGrad Sp. z o.o. with Tax ID: PL6762676561 and KRS-number: 0001125554
Latest Posts
Video Description
👉 NEW React & Next.js Course: https://bytegrad.com/courses/professional-react-nextjs Hi, I'm Wesley. I'm a brand ambassador for Kinde (paid sponsorship). 👉 Add auth to your app FAST: https://bit.ly/3QOe1Bh 👉 NEW React & Next.js Course: https://bytegrad.com/courses/professional-react-nextjs 👉 Professional JavaScript Course: https://bytegrad.com/courses/professional-javascript 👉 Professional CSS Course: https://bytegrad.com/courses/professional-css 👉 Discord: all my courses have a private Discord where I actively participate 🔔 Email newsletter (BIG update soon): https://email.bytegrad.com ⏱️ Timestamps: 0:00 Fetching data in server components 0:58 Traditional data mutations 2:54 Server actions for mutations 6:37 Revalidating data 8:08 Under the hood 9:28 2 Other Benefits 10:31 Server Action in client component 13:20 Reset form 15:44 Downside of client components 16:06 useFormStatus (pending state) 18:20 Error handling 19:55 useOptimistic (optimistic UI) 26:29 formAction 27:10 Server Actions outside form #webdevelopment #programming #coding Note that my videos may contain mistakes. Always verify yourself that your code is safe and does what you want it to do for your specific situation. You agree by watching the videos that you are solely responsible for any mistakes in your code. This channel and all its content is owned & operated by ByteGrad Sp. z o.o. with Tax ID: PL6762676561 . . TOP resource to LEARN AI for Developers - https://datacamp.pxf.io/RGyxrR (paid sponsorship & ByteGrad Sp. z o.o. gets commission)
Bike Repair Essentials Now
AI-recommended products based on this video

2 Pack 27.5 Inch Bike Tube AV32mm Schrader Valve, 27.5" Bicycle Tube for 27.5 x 2.125/2.20/2.25/2.30/2.35/2.40 Bike Tire, Butyl Rubber Inner Tube with 2 Tire Levers for Mountain MTB Bike

AstroAI L7 Tire Inflator Portable Air Compressor Cordless Bike Pump with Digital Dual Values Display, 150 PSI Car Tires Pump with LED Lights Air Pump for Cars, Motorcycles, Bikes, Balls

COOLMAN Tire Inflator Portable Air Compressor, 150PSI Cordless Electric Bike Pump, Portable Tire Inflator with LCD Pressure Gauge & LED Light, Ideal for Cars, Bicycles, Motorcycles, and Sports Balls

Tire Inflator Portable Air Compressor, 160PSI Tire Inflator for Car, 6X Faster Air Compressor with Digital Pressure Gauge, Tire Pump for Car, Motorcycle, Bike and Ball

Tire Inflator Portable Air Compressor- 150PSI Air Pump Cordless Electric for Car, Motorcycle,Ball, Bike, with Tire Gauge Pressure, Dual-Use Type

AstroAI L7 Tire Inflator Portable Air Compressor Cordless Bike Pump with Digital Dual Values Display, 150 PSI Car Tires Pump with LED Lights Air Pump for Cars, Motorcycles, Bikes, Balls

COOLMAN Tire Inflator Portable Air Compressor, 150PSI Cordless Electric Bike Pump, Portable Tire Inflator with LCD Pressure Gauge & LED Light, Ideal for Cars, Bicycles, Motorcycles, and Sports Balls

Tire Inflator Portable Air Compressor, 160PSI Tire Inflator for Car, 6X Faster Air Compressor with Digital Pressure Gauge, Tire Pump for Car, Motorcycle, Bike and Ball




















