Перейти к содержимому

How To Use Next.js 14 Server Actions

Brett Westwood - Software Engineer

0:00 / 0:00

How To Use Next.js 14 Server Actions

27 021 просмотр · 2 года назад
Brett Westwood - Software Engineer
10,3 тыс. подписчиков
27 021 просмотр · 2 года назад
My fav place to learn to code is Scrimba Get 20% off a subscription with my link 👇 https://scrimba.com/?via=brettwestwood Next.js 14 has now made server actions production ready. In this video, I go over how you can implement server actions into your project so you don't have to manually create API endpoints. Server actions allow for server mutations right inside of your components. Server Actions can be defined in Server Components or called from Client Components. Defining the action in a Server Component allows the form to function without JavaScript, providing progressive enhancement. Join my FREE Discord to talk and network about web development! 👇   / discord   TimeStamps 0:00 Intro 1:18 The Old Way of Server Mutations 4:07 Server Actions in Server Components 7:25 Revalidate Path 9:17 Client Component Server Actions 15:53 Reset the form 17:30 Loading State (useFormStatus Hook) 20:43 Outro