🚀 UPDATED VERSION: [ Ссылка ] 🚀
Route Handlers are a way to perform server-side mutations in Next.js. They live alongside Client and Server Components in the app directory, and replace what were previously known as API Routes.
In this video, Jon Meyers explores building CRUD functionality with a single Route Handler that listens for multiple types of requests - GET, PUT and POST.
Additionally, he shows how to build a Next.js application that can consume this Route Handler across multiple Client and Server Components, and how to cache data.
00:00 Introduction
00:39 Overview of Supabase project
01:21 Creating a Next.js app
02:10 Querying data with supabase-js
04:00 Sending a GET request from Server Component
05:23 Caching in Route Handlers
06:59 Listening for POST requests in Route Handlers
08:10 Sending a POST request from Client Component
09:50 Listening for PUT requests in Route Handlers
10:31 Sending a PUT request from Client Component
12:20 Outro
More Next.js and Supabase:
🧠 Fetching and Caching data in Next.js Server Components: [ Ссылка ]
🥊 Client vs Server Components in Next.js app directory: [ Ссылка ]
🚀 Generate TypeScript defs from Supabase Schema: [ Ссылка ]
More Supabase
👇 Learn more about Supabase 👇
🕸 Website: [ Ссылка ]
🏁 Get started: [ Ссылка ]
📄 Docs: [ Ссылка ]
![](https://i.ytimg.com/vi/6MoYy62E4rw/maxresdefault.jpg)