simplify test (#10538)

Co-authored-by: Rich Harris <rich.harris@vercel.com>
pull/10544/head
Rich Harris 10 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> <script>
import { untrack } from 'svelte';
import { writable } from 'svelte/store'; import { writable } from 'svelte/store';
import { log } from './log'; import { log } from './log';
const storeCount = writable(0) const count = writable(0);
let count = $state(0); let ran = 0;
$effect(() => { $effect(() => {
$storeCount; $count;
untrack(() => { log.push(++ran);
count++;
log.push(count);
});
}); });
</script> </script>
<button on:click={() => $storeCount++}>increment</button> <button on:click={() => $count++}>increment</button>

Loading…
Cancel
Save