ryanwhitfield.dev
ryanwhitfield.dev
@ryanwhitfield.dev
Agree that the decision to expose a function remotely is an export-time decision. But isn't the client component decision made at import-time? If you import from a client component, you want a function. If you import from a server component, you want a string (or w/e serialized form).
April 28, 2025 at 12:31 AM
I like the idea of RPCs and scripts being handled by the module system. I think it would feel less magical if the syntax was tied to import/export instead of directives. Something like:

import { LikeButton } from './frontend' with { type: 'script' };
export remote async function likePost(postId)
April 27, 2025 at 11:53 PM