Remote Control
summary
SvelteKit adds remote modules that declare server-held state and expose queries and commands, wired via Vite/Rollup plugin hooks (resolveId/load/transform/renderChunk/writeBundle). The team builds per-function endpoints by loading modules on the server during transform, returns single-flight mutation responses that include updated queries, and supports optimistic updates with automatic rollback. Demos show a persisted counter, batched weather requests, and form handlers with Valibot/Zod validation and client-side enhancements; the system works today but relies on heavy plugin-API hacks.
AI-written summary · about
chapters (9)
- 0:00Introduction to talk
- 1:30Rollup and plugin API origins
- 4:40Vite plugin API in SvelteKit
- 9:14Remote functions concept
- 9:34Button demo with remote state
- 16:14Weather app with batched queries
- 18:41Todo app with form handling
- 23:13How remote functions work
- 24:58Conclusion and call to action
related talks
36mSvelte - Web App Development Reimagined
37mBuilding With SvelteKit
16mSvelteKit
27mProgressively enhanced apps with Svelte
29mGet Your Web App Development in Shape with SvelteKit
22mBringing Back Progressive Enhancement
25mDemystifying Client & Server Rendering in SvelteKit
53mSvelte, cybernetically enhanced web apps
