Skip to content

docs: clarify Client Components are pre-rendered during SSR#8489

Open
LuxologyGG wants to merge 1 commit into
reactjs:mainfrom
LuxologyGG:fix/auto-issue-7223
Open

docs: clarify Client Components are pre-rendered during SSR#8489
LuxologyGG wants to merge 1 commit into
reactjs:mainfrom
LuxologyGG:fix/auto-issue-7223

Conversation

@LuxologyGG

@LuxologyGG LuxologyGG commented Jun 21, 2026

Copy link
Copy Markdown

Summary

Closes #7223

The use client reference incorrectly implied that Client Components are skipped during server rendering, when they are actually pre-rendered to HTML on the server and hydrated on the client.

This PR clarifies that Client Components are pre-rendered on the server during SSR and updates the Client/Server Component definitions to reflect server pre-rendering plus client hydration.

Before / After

Before: "opting-out of evaluating any code imported from client-marked code" and Client Components defined as "rendered on the client."

After: Client Components are pre-rendered on the server to HTML, bundled separately, and hydrated on the client.

Verification

Documentation-only change.

Fixes reactjs#7223

The use-client reference incorrectly implied that Client Components
are skipped during server rendering. Client Components are pre-rendered
to HTML on the server and hydrated on the client.
@github-actions

Copy link
Copy Markdown

Size changes

Details

📦 Next.js Bundle Analysis for react-dev

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@LuxologyGG LuxologyGG marked this pull request as ready for review June 23, 2026 20:00
Copilot AI review requested due to automatic review settings June 23, 2026 20:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@gaearon

gaearon commented Jun 24, 2026

Copy link
Copy Markdown
Member

I think we may need to do a more significant rewrite/rethinking of these pages. The model they're teaching is simplified and kind of incorrect, but we need to think about how to convey them well. The problem is that two worlds (Client and Server) have a very clean split; however, they don't have to map 1:1 to the physical "client" and "server". That's the key thing that we need to communicate somewhere.

@LuxologyGG

Copy link
Copy Markdown
Author

Thank you for the feedback.

You're right that the current Client/Server Component model on this page is simplified. Issue #7223 specifically flagged the sentence implying Client Components are skipped during SSR, which contradicts how frameworks actually pre-render them to HTML. This PR only targets that inaccuracy: it clarifies pre-rendering on the server and hydration on the client, without attempting to address the broader 1:1 mapping between logical Client/Server boundaries and physical client/server runtimes.

If a larger rewrite is the preferred path, I'm happy to close this PR and wait for direction on how you'd like that conceptual split communicated. Alternatively, if this targeted correction is still useful while a broader rethink is planned, I can keep it scoped to the SSR wording fix.

Let me know which direction you'd prefer.

@gaearon

gaearon commented Jun 24, 2026

Copy link
Copy Markdown
Member

Do you have any suggestions for how we could do this properly?

The current description isn't correct for HTML-generating frameworks on the first render (but it is correct for next render, or for frameworks that skip HTML generation, since it's up to the framework to decide whether to do it or not). So strictly speaking your change wouldn't be fully correct either.

It also makes the flow sound a lot more complicated when it's really more like two different things. One is the React Client and React Server trees. Another is how they get turned into HTML or other output formats.

I don't have a specific idea for how to solve this at the moment. But I have a hunch that a proper explanation would still look more "symmetrical".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Typo]: Client Components running on the server

4 participants