Video yükleniyor...
Video Yüklenemedi
Server actions vs API routes in Next.js
59,223 görüntüleme • 1 yıl önce •via X (Twitter)
10 Yorum

First time feeling like the App router isn't confusing, thank you for the explaination

🫡

Man, I wish I had known the difference a year ago when i was making a messaging web app, and ended up using api routes, server action, and server components altogether in that project. 😂shi was slow af

why use useSWR for fetching? isn't the standard fetch enough for data fetching?

Standard fetch is enough. But you usually end up re-creating your own version of Tanstack Query/SWR as your app grows. However, with the App Router, start by fetching in server components. You might not need that much client-side fetching in the first place

Nailed it – especially wrt to talking to multiple clients. You can take it a step further by using by @ido_pesok to expose your server actions consumable via endpoints

What are you using for animations? :) Gr8 job!

Apple Keynote + Screen Studio

🔥🔥

“What I’m saying is that when you’re ready, you won’t have to.” - Nest.js
Benzer Videolar
Protect routes with next-auth middleware in Next.js 13
Alex Sidorenko
139,308 görüntüleme • 2 yıl önce
How to recover from a server component error in Next.js
Alex Sidorenko
67,557 görüntüleme • 1 yıl önce
