Syntax - Tasty Web Development Treats

955: SvelteKit has solved data loading

40 snips
Nov 17, 2025
Scott and Wes dive into SvelteKit's new remote functions, which tackle long-standing challenges in data loading. They discuss the clever use of queries, forms, and batching that simplify Svelte's data management. The duo also compares Svelte’s async capabilities with React, highlighting its advantages. They explore fascinating topics like standard schema for seamless TypeScript validation and progressive enhancements for HTML forms. The episode wraps up with Scott's cold brew coffee tips and Wes's love for a new Bosch dishwasher.
Ask episode
AI Snips
Chapters
Transcript
Episode notes
INSIGHT

Function-Style Server Calls

  • SvelteKit remote functions let you call server code as plain functions from components, removing route-based load hot-potatoing.
  • You can await queries directly in components or use query.loading/error/current for reactive UX.
INSIGHT

Await Anywhere In Components

  • Async Svelte plus remote functions enable awaiting data at the component level, improving server/client rendering ergonomics.
  • This removes the need for useEffect-style patterns common in client React for simple fetches.
ADVICE

Use Standard Schema For Validation

  • Use Standard Schema validators (Zod, Valibot, etc.) as the first parameter to remote queries to get unified validation and types.
  • This yields seamless TypeScript types and consistent client/server validation without extra type imports.
Get the Snipd Podcast app to discover more snips from this episode
Get the app