6 articles tagged #loading on hackpile.dev.
- Capstone: Building a Pokémon Browser with PokéAPI
Build a Pokémon browser with SvelteKit: URL params, parallel fetching, streaming, parent data, TypeScript, and invalidation with PokéAPI.
- Errors and Redirects in Load Functions
How to throw expected and unexpected errors, and redirect users from SvelteKit load functions — including the redirect trap that silently breaks route guards.
- TypeScript and $types in Load Functions
How SvelteKit generates $types for every route, which type to use in which file, how layout and page data merges at the type level, and how to fix common inference breakdowns.
- Using URL Data in Load Functions
Learn how to use params, url, and route inside SvelteKit load functions to build dynamic, filterable, and paginated pages with full type safety.
- Page Data vs Layout Data
Learn how SvelteKit separates page and layout data loading, how data flows through layouts, and how to access it from any component.
- +page.js
Learn how load functions work in +page.js for universal data loading in SvelteKit. Understand when it runs, how to fetch data, and connect it to your pages.