Loading video...

Video Failed to Load

Go Home

Server actions vs API routes in Next.js

59,223 views • 1 year ago •via X (Twitter)

10 Comments

Abod 🚀's profile picture
Abod 🚀1 year ago

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

Alex Sidorenko's profile picture
Alex Sidorenko1 year ago

🫡

Designly's profile picture
Designly1 year ago

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

Koka's profile picture
Koka1 year ago

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

Alex Sidorenko's profile picture
Alex Sidorenko1 year ago

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

Garrett's profile picture
Garrett1 year ago

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

Daniel Noworyta's profile picture
Daniel Noworyta1 year ago

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

Alex Sidorenko's profile picture
Alex Sidorenko1 year ago

Apple Keynote + Screen Studio

Alfon's profile picture
Alfon1 year ago

🔥🔥

Paul @ Deterministic Design's profile picture
Paul @ Deterministic Design1 year ago

“What I’m saying is that when you’re ready, you won’t have to.” - Nest.js

Related Videos