Series: Svelte Basics
21 articles
- 11.
Component Lifecycle
Understand when Svelte components mount, update, and destroy. Master onMount, onDestroy, beforeUpdate, afterUpdate, and tick.
- 12.
Stores for State
Manage shared state across components with Svelte stores. Learn writable, readable, and derived stores with the auto-subscription syntax.
- 13.
Context API
Share data through component trees without prop drilling. Learn setContext, getContext, and when to use context vs stores.
- 14.
Introduction to SvelteKit
Discover what SvelteKit adds to Svelte. Learn about project structure, the dev server, and how SvelteKit handles routing, SSR, and more.
- 15.
Routing and Pages
Master SvelteKit's file-based routing system. Learn dynamic routes, route groups, optional parameters, and layout patterns.
- 16.
Loading Data
Fetch data for your pages with SvelteKit load functions. Learn the difference between server and universal loads, and how to handle errors.
- 17.
Form Actions
Handle form submissions with SvelteKit's actions. Learn progressive enhancement, validation, and how to build forms that work without JavaScript.
- 18.
API Routes
Build backend endpoints with SvelteKit's +server.js files. Learn to handle HTTP methods, return JSON, and create REST APIs.
- 19.
Error Handling
Handle errors gracefully in SvelteKit. Learn about error pages, the error() helper, expected vs unexpected errors, and hooks.
- 20.
Deployment
Deploy your SvelteKit app to production. Learn about adapters, environment variables, and deployment platforms like Vercel, Netlify, and Cloudflare.