Commit 7f56f35
committed
reimplement the router with createSubscriber from svelte/reactivity
https://svelte.dev/docs/svelte/svelte-reactivity#createSubscriber
Available since Svelte 5.7.0
The router now doesn't need to be a rune,
use `createSubscriber()` in a normal .ts file instead.
`libs/router.ts` exports a singleton of the class Router
(even though, theoretically, the class can be used multiple times too)1 parent f807fef commit 7f56f35
6 files changed
Lines changed: 201 additions & 185 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
0 commit comments