Skip to content

Instantly share code, notes, and snippets.

View p10's full-sized avatar
🥴

Piotr Wasilewski p10

🥴
View GitHub Profile
@p10
p10 / HashRouter.md
Created May 7, 2026 18:10 — forked from machellerogden/HashRouter.md
HashRouter.svelte - Svelte 5 Optimized Hash Router

Svelte 5 Hash Router

A lightweight, production-ready hash-based router for Svelte 5, built on SvelteURL. It supports:

  • Route guards (sync or async)
  • Param extraction with optional async resolvers
  • Reactive location and state exports
  • Minimal, idiomatic integration with Svelte's reactivity model

Inspired by the principle of reactive first, framework last—this router leans on standards and composition, not magic.