Claim: “React Server Components (RSC) are just PHP”


Claim: “React Server Components (RSC) are just PHP”.

Reality: RSC is special because it finally means we can use the *same tech* to render components *on both the client or the server*. 🔥

One line of code converts a server component into a client component:

'use client'
If it's interactive, put 'use client' at the top, and render on the client.

If it's not interactive, render on the server. This sends *zero* extra JS to the client.

With React Server Components, we get the best of both worlds. 👍
With React server components, we don't need to master a server-side language and a client-side language.

We can write client-side and server-side solutions in one language: JavaScript. (or better yet, TypeScript).

This simplifies hiring and enables server/client code reuse.

View original on X