Content
@
https://warpcast.com/~/channel/svelte
0 reply
0 recast
0 reaction
Darryl Yeo 🛠️
@darrylyeo
Remote Functions are coming to SvelteKit. They're defined in `.remote.ts` files, come in four flavors (`query` / `form` / `command` / `prerender`) and support any validation library adhering to the Standard Schema protocol. Benefits: end-to-end type-safety across frontend and backend, progressively enhanced forms that work with JavaScript disabled, and a slew of modern async request caching and invalidation patterns (single-flight mutations, partial pre-rendering, optimistic updates) built right in.
4 replies
0 recast
5 reactions
Rafi
@rafi
Hell has frozen. The community was quite contra server functions but I guess that's becoming a standard now
1 reply
0 recast
1 reaction
Darryl Yeo 🛠️
@darrylyeo
You’re referring to React Server Functions? The Svelte team is learning from that and taking things in a different direction. Notably, not co-locating server code in the same file as client-side code.
1 reply
0 recast
0 reaction
Rafi
@rafi
Yes, React’s and Solid’s. Svelte’s approach much cleaner — as usual :)
0 reply
0 recast
1 reaction