zlacker

[parent] [thread] 5 comments
1. morshu+(OP)[view] [source] 2025-12-04 00:00:34
"React Server Functions allow a client to call a function on a server"

Intentionally? That's a scary feature

replies(2): >>pas+pc >>azangr+lR
2. pas+pc[view] [source] 2025-12-04 01:43:14
>>morshu+(OP)
used to wire up form submission in a type-safe way, so that part makes sense at least

whatever monstrosity hides underneath these nice high-level TypeScript frameworks to make all of it happen in JS, usually that's the worrying part

3. azangr+lR[view] [source] 2025-12-04 08:57:45
>>morshu+(OP)
> Intentionally?

It's RPC. Remote procedure calls. An approach that has made a comeback in the front-end space recently. There was tRPC; then react made a splash with the release of its server components; then other frameworks started emulating the approach. I think Svelte now has something similar with its "remote functions". And Solid has been working on something similar; so that SolidStart now has a "use server" pragma. They probably don't replicate React's protocol; but the idea of calling functions on the server is similar.

replies(2): >>throwu+oW >>morshu+JX1
◧◩
4. throwu+oW[view] [source] [discussion] 2025-12-04 09:39:21
>>azangr+lR
> An approach that has made a comeback in the front-end space recently.

It wasn’t really a “comeback,” RPC never lost popularity. We just called them “REST” APIs that were a barely disguised adhoc JSON RPC format with a few CRUD verbs tacked on for routing requests.

replies(1): >>morshu+VX1
◧◩
5. morshu+JX1[view] [source] [discussion] 2025-12-04 16:39:12
>>azangr+lR
RPC is normally more explicit than this, or when it's not, it's server2server stuff like in Erlang.
◧◩◪
6. morshu+VX1[view] [source] [discussion] 2025-12-04 16:39:54
>>throwu+oW
If people even bothered with the CRUD verbs instead of making everything POST
[go to top]