How To Use Next.js 14 Server Actions

Brett Westwood - Software Engineer
Brett Westwood - Software Engineer
23.8 هزار بار بازدید - 8 ماه پیش - Next.js 14 has now made
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: 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
8 ماه پیش در تاریخ 1402/08/17 منتشر شده است.
23,800 بـار بازدید شده
... بیشتر