Skip to content

docs(blog): use createFromReadableStream for the dashboard snippet#873

Merged
tannerlinsley merged 1 commit intomainfrom
taren/rsc-blog-fix-snippet
Apr 29, 2026
Merged

docs(blog): use createFromReadableStream for the dashboard snippet#873
tannerlinsley merged 1 commit intomainfrom
taren/rsc-blog-fix-snippet

Conversation

@tannerlinsley
Copy link
Copy Markdown
Member

@tannerlinsley tannerlinsley commented Apr 29, 2026

Summary

  • The "Why this matters" dashboard example was using <CompositeComponent> for what is structurally a leaf server fragment with no client-filled slots
  • Switches it to the basic primitive (createFromReadableStream), matching the pattern from the prior react-server-components post
  • <CompositeComponent> is still introduced later in the post for the slot-based case (PostPage), which is its correct home

Test plan

  • Re-read the "Why this matters" section — code now matches the surrounding prose ("ask the server for a rendered chart fragment, drop it into the tree")

Summary by CodeRabbit

  • Documentation
    • Updated blog post with an improved example demonstrating how to render server-driven components with streaming capabilities.

The Why this matters snippet showed a leaf server fragment dropped into a
client tree, which is the basic primitive case (createFromReadableStream),
not a Composite Component (which is for fragments that expose slots).
@tannerlinsley tannerlinsley merged commit 092876e into main Apr 29, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 29, 2026

Deploy Preview for tanstack ready!

Name Link
🔨 Latest commit dfc2bcb
🔍 Latest deploy log https://app.netlify.com/projects/tanstack/deploys/69f194dc45fedb000827e444
😎 Deploy Preview https://deploy-preview-873--tanstack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 33
Accessibility: 90
Best Practices: 83
SEO: 97
PWA: 70
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@tannerlinsley tannerlinsley deleted the taren/rsc-blog-fix-snippet branch April 29, 2026 05:19
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 29, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1e115d99-ef5a-4190-9419-09afbeab8026

📥 Commits

Reviewing files that changed from the base of the PR and between 9f681bb and dfc2bcb.

📒 Files selected for processing (1)
  • src/blog/who-owns-the-tree-rsc-is-a-protocol-not-an-architecture.md

📝 Walkthrough

Walkthrough

Updated a blog post example to demonstrate RSC stream handling. Replaced composite component pattern with createFromReadableStream approach, converting server response data into a readable stream for React decoding and rendering directly as JSX.

Changes

Cohort / File(s) Summary
Blog Post Example Update
src/blog/who-owns-the-tree-rsc-is-a-protocol-not-an-architecture.md
Updated dashboard example code to use createFromReadableStream for RSC rendering instead of wrapping with a composite component. Query result now stored as chart and asynchronously converts server response to readable stream.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

A rabbit hops through streams so clear,
Where RSCs now appear,
No composite wraps the data flow,
Just fragments dance in readableStream's glow,
Documentation blooms, the chart takes its bow! 🐰✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch taren/rsc-blog-fix-snippet

Review rate limit: 4/5 reviews remaining, refill in 12 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant