Загрузка видео...

Не удалось загрузить видео

На главную

Client/Server composition with server components feels illegal 😅

69,174 просмотров • 2 лет назад •via X (Twitter)

Комментарии: 10

Фото профиля Savva Mikhalevski
Savva Mikhalevski2 лет назад

This can be done with the same number of lines using regular REST. But with rate limiting, caching, proper security, and separation of concerns.

Фото профиля jarindr.eth | zentry ⚡️
jarindr.eth | zentry ⚡️2 лет назад

Can someone tell me what's the benefit vs calling API and update result on the client again? Not talking about you don't need "backend"

Фото профиля Alex Sidorenko
Alex Sidorenko2 лет назад

I think it's mainly this 1. Eliminate the problem of duplicating and synchronizing the data state on the client 2. Great potential for shared full-stack components in the future

Фото профиля Eric Afes
Eric Afes2 лет назад

So having a key on the Suspense forces the server component to rerun? 🤔

Фото профиля Alex Sidorenko
Alex Sidorenko2 лет назад

The server component reruns because of the query params updates (regardless of the key on the Suspense). The key on the Suspense re-triggers the suspense fallback on every re-run. Here is how it would work without it.

Фото профиля Abdulrahman
Abdulrahman2 лет назад

It’s legal though 😂

Фото профиля Fredkisss is on 🦋 blue sky 🦋
Fredkisss is on 🦋 blue sky 🦋2 лет назад

This is actually incredible 🤯

Фото профиля Kofi Bamfo Quaicoe
Kofi Bamfo Quaicoe2 лет назад

Can you please make a @YouTube tutorial for all these...

Фото профиля Alex Sidorenko
Alex Sidorenko2 лет назад

@YouTube What would you like to see in a tutorial?

Фото профиля Salik Jamal
Salik Jamal2 лет назад

These tutorials are always great man, Next.js is awesome!

Похожие видео