typescriptSvelteintermediate
Svelte 5 Universal State Rune
Modern Svelte 5 $state and $derived reactive typing
By ApeType Staff·16 lines·279 characters·1,420 total attempts
export class TimerState {
elapsed = $state(0);
running = $state(false);
minutes = $derived(Math.floor(this.elapsed / 60));
seconds = $derived(this.elapsed % 60);
start() {
this.running = true;
}
reset() {
this.elapsed = 0;
this.running = false;
}
}
TRANSCRIBE
Ready when you are.
Test your muscle memory and transcription speed against this exact snippet.
Start Typing
Tip: Press Esc anytime to restart
Best runs on this snippet
| # | Typist | Acc | WPM |
|---|---|---|---|
| 1 | Henok Yoseph | 99.36% | 62 |
| 2 | Henok Yoseph | 99.36% | 62 |
| 3 | Gerum Berhanu | 100% | 58 |
| 4 | Abel Gideon | 96.99% | 52 |
| 5 | Henok Yoseph | 95.49% | 51 |