Progressively Enhanced Mutations with Next.js Server Actions

Опубликовано: 04 Октябрь 2024
на канале: Supabase
7,904
217

🚀 UPDATED VERSION:    • Cookie-based Auth and the Next.js App...   🚀

Server Actions are the new way to do server-side mutations with the Next.js App Router! 🚀

In this video, Jon Meyers demonstrates three ways to invoke these Server Actions - action, formAction and Custom Invocation - and discusses the tradeoffs of each! 🧠

00:00 Introduction
00:15 Creating a Next.js app with App Router
01:09 Install supabase-js library
02:08 Configure a Supabase client
03:43 Querying data from Supabase
06:41 Option 1: action prop on form
09:16 Option 2: formAction prop on button
12:54 Option 3: Manual Invocation with JS
15:40 Ideas for the future

👇 Learn more about Supabase 👇

🕸 Website: https://supabase.com/
🏁 Get started: https://app.supabase.com/
📄 Docs: https://supabase.com/docs