Skip to content

Conversation

@uhyo
Copy link
Owner

@uhyo uhyo commented Feb 9, 2026

Summary

Updated the LearnRscPage documentation to reflect that Router is already marked with "use client" at the main entry point, eliminating the need for a separate ClientApp wrapper component. This simplifies the architecture and reduces boilerplate for users.

Key Changes

  • Removed ClientApp wrapper pattern: Eliminated all examples showing a separate client component wrapper. Users can now import Router directly from @funstack/router in server components.
  • Simplified code examples: Updated all code blocks to show Router being used directly in server components without an intermediate client boundary wrapper.
  • Clarified client boundary behavior: Added explanation that the RSC bundler automatically handles placing Router and its dependencies in the client bundle when imported from server components.
  • Added loader documentation: Introduced a new subsection explaining how to define loaders in "use client" modules since loaders run client-side and cannot be defined inline in server modules.
  • Updated conceptual explanations: Revised prose to explain that route definitions are plain serializable data passed as props across the boundary, without needing a wrapper component.

Notable Details

  • The change maintains backward compatibility in functionality while simplifying the mental model for developers
  • Loader handling is now explicitly documented with concrete examples showing the pattern of defining loaders in client modules and importing them into server-side route definitions
  • All example code now follows the simpler pattern consistently across different scenarios (basic setup, full example, etc.)

https://claude.ai/code/session_01R782qoJW65TZmzgxtmnBPC

- Remove unnecessary ClientApp pattern from all examples. Router is
  already a "use client" component and can be used directly from server
  components without an intermediate wrapper.
- Add "Loaders in an RSC Context" section explaining that loaders run
  client-side and must be defined in "use client" modules when route
  definitions live in server context.
- Update Client Boundary section, Complete Example, and Key Takeaways
  to reflect both changes.

https://claude.ai/code/session_01R782qoJW65TZmzgxtmnBPC
Reword phrases that read as corrections to a previous version
("no additional wrapper needed", "already a client component",
"without a separate client wrapper") into positive, standalone
statements. New readers now learn what Router *is* (the client
boundary) rather than what it *isn't*.

https://claude.ai/code/session_01R782qoJW65TZmzgxtmnBPC
@uhyo uhyo merged commit 3775068 into master Feb 9, 2026
1 check passed
@uhyo uhyo deleted the claude/improve-rsc-docs-frOg3 branch February 9, 2026 06:00
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.

2 participants