Skip to content

Conversation

@hi-ogawa
Copy link
Owner

@hi-ogawa hi-ogawa commented Jun 3, 2025

Instead of creating registerClientReference on the fly, we should technically pull original "use client" module on server to preserve module export identity.

Well, actually I'm not sure how this difference would manifest on user land e.g.

// on server
import { TestClient } from "./client";

const original = <TestClient />
const serialized = renderToReadableStream(original, ...);
const deserialized = createFromReadableStream(stream, ...);

// what's the meaningful difference for users on "server"?
// - original vs deserialized
// the actual client module identity will be restored on "client" (browser/ssr) in the same way

and it sounds fine to not go so strict and we can postpone?

todo

Copy link
Owner Author

hi-ogawa commented Jun 3, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@hi-ogawa hi-ogawa changed the title refactor(rsc): refactor server deserialization fix(rsc): fix server deserialization? Jun 3, 2025
@hi-ogawa hi-ogawa mentioned this pull request Jul 3, 2025
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