simplify test (#10538)

Co-authored-by: Rich Harris <rich.harris@vercel.com>
pull/10544/head
Rich Harris 6 months ago committed by GitHub
parent 9c8e643b64
commit 151cdeacaf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1,18 +1,14 @@
<script>
import { untrack } from 'svelte';
import { writable } from 'svelte/store';
import { log } from './log';
const storeCount = writable(0)
let count = $state(0);
const count = writable(0);
let ran = 0;
$effect(() => {
$storeCount;
untrack(() => {
count++;
log.push(count);
});
$count;
log.push(++ran);
});
</script>
<button on:click={() => $storeCount++}>increment</button>
<button on:click={() => $count++}>increment</button>

Loading…
Cancel
Save