DON’T do this if you use App router

preview_player
Показать описание
Please stop using route handlers incorrectly.. You don't need to use them in Server Components just use a server action.

Join this channel to get access to perks:

Follow me on:
Рекомендации по теме
Комментарии
Автор

Another amazing video! Keep them coming. 🙌

AnshumanBhardwaj
Автор

Sveltekit has a feature where if you fetch local resources, it won't go out of server rather directly to the resource, something like trpc from server component

raiyansarker
Автор

I have been using server actions on all my recent projects, even using them in prod (not sure if that is a great idea right now)

JEM_GG
Автор

I think just as you do, but on the other hand, using the fetch in our server componentes with NextJS, allows us to add a cache layer to our api endpoints.
At least that's why i've been using the fetch api instead of directly calling the database in some places of my app.
Maybe i'm just doing something wrong and misunderstood this, but couldn't find any other way to take advantage of NextJS caching in that way

tomirodriguez
Автор

Didn't you encourage ppl to uninstall vscode for zed?🙃

Ebbzzor