4 ms·
"React Server Functions allow a client to call a function on a server" Intentionally? That's a scary feature
by morshu9001 11mo ago
"React Server Functions allow a client to call a function on a server"
Intentionally? That's a scary feature
- pas 11mo agoused 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
- azangru 11mo ago> 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.
- throwup238 11mo ago> 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.
- deleted 11mo ago[deleted]
- morshu9001 11mo agoIf people even bothered with the CRUD verbs instead of making everything POST
- morshu9001 11mo agoRPC is normally more explicit than this, or when it's not, it's server2server stuff like in Erlang.