Client/Server composition with server components feels illegal ๐
@asidorenko_35K followers
69,174 views
10 Comments
Comments from the original post on X (Twitter)

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

@jarindr
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"
3 likes

@asidorenko_
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
3 likes

@eriicafes
So having a key on the Suspense forces the server component to rerun? ๐ค
2 likes

@asidorenko_
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.
8 likes

@DoudGaya
Itโs legal though ๐
1 like

@fredkisss
This is actually incredible ๐คฏ
1 like

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

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

@salikjamal20
These tutorials are always great man, Next.js is awesome!
1 like