You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor HeavyMarkdownEditor to use the shared MarkdownViewer component
while maintaining the heavy bundle demonstration.
Changes:
- Import shared MarkdownViewer component
- Add react-dom/server to convert ReactMarkdown output to HTML string
- Store processedHtml instead of MarkdownComponent in state
- Re-process markdown on every change for live preview
- Pass HTML to shared MarkdownViewer for display
Bundle impact (still heavy):
- Transferred: ~315KB (react-markdown + remark-gfm + react-dom/server)
- Uncompressed: ~1.53MB
- This demonstrates client-side bundle weight vs RSC's server-side processing
The shared component pattern is now complete:
- HeavyMarkdownEditor: Client-side processing → MarkdownViewer
- RSCMarkdownPage: Server-side processing → MarkdownViewer
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments