mirror of
https://github.com/LukeHagar/unicorn-utterances.git
synced 2025-12-09 12:57:45 +00:00
1.0 KiB
1.0 KiB
title, description, published, authors, tags, attached, license, collection, order
| title | description | published | authors | tags | attached | license | collection | order | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| What are React Server Components (RSCs)? | 2023-12-14T21:52:59.284Z |
|
|
cc-by-4 | React Beyond the Render | 1 |
So! Instead, what React did is introduce "Server Components", where you can do a few things:
- Not re-render on the client
- Fetch data on the server and return it to the client 🤫 (spoilers for what I'm gonna write)
So instead of:
<Layout>
<Header/>
<Content/>
<Footer/>
</Layout>
And having React render 4 components on the server, then re-render 4 components on the client - you might have:
<ServerLayout>
<ServerHeader/>
<ClientContent/>
<ServerFooter/>
</ServerLayout>
And keep the first 4 component renders on the server, but only re-render ClientContent on the client, saving the amount of JS needed and the speed in parsing
So that's the RSC (React Server Component) story