Using Forms in Next.js (Server Actions, Revalidating Data) @leerob
Using Forms in Next.js (Server Actions, Revalidating Data)  @leerob
Uploaded September 2023 | Updated December 2026, 3 hours ago
Learn how to create forms and handle data mutations in the Next.js App Router. This tutorial walks through using Server Actions, creating loading and error states with useFormStatus and useFormState, as well as accessibility best practices.

0:00 – Introduction
0:06 – Demo
0:21 – Forms with Pages Router
1:05 – create-next-app
1:30 – Server Component (Data Fetching)
1:58 – Forms and action prop
3:05 – Server Actions (and useFormState)
4:32 – Progressive enhancement
5:03 – Loading states (useFormStatus)
7:13 – Revalidating data and caching
8:12 – Accessibility and error states
9:58 – Conclusion

◆ Docs: nextjs.org/docs/pages/building-your-application/data-fetching/forms-and-mutations
◆ Example: github.com/vercel/next.js/tree/canary/examples/next-forms
◆ React Canary Example: codesandbox.io/s/vigorous-curran-glmlvf?file=/src/App.js
◆ Server Actions: nextjs.org/docs/app/api-reference/functions/server-actions
◆ "use server" : https://react.dev/reference/react/use-server
Using Forms in Next.js (Server Actions, Revalidating Data)Building Raycast extensions with Thomas Paul Mann (CEO & Co-Founder)Building A Blog With MDX – Learn Next.jsBuilding with SvelteKit! (Nested Routes, Page Endpoints)Building a Linktree Clone! (Next.js, React, Tailwind CSS)CSR / SSR / SSG / ISR with Next.js – Explained!How Im Writing CSS in 2024Headless CMS, Nuxt, and Vue.js! (with Lucie Haberer)Managing Assets and SEO – Learn Next.jsEducation & E-Commerce (with Rachael Thompson)Introduction to Next.js and Reactv0 101: How to build products with AI
leerob |

Using Forms in Next.js (Server Actions, Revalidating Data)

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER