Skip to content

Commit fb35383

Browse files
committed
oops
1 parent b4508ea commit fb35383

File tree

1 file changed

+1
-12
lines changed
  • packages/svelte/tests/runtime-runes/samples/derived-fn

1 file changed

+1
-12
lines changed
Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,6 @@
11
<script>
22
let count = $state(0);
3-
let other = $state(0);
4-
function create_derived() {
5-
other++;
6-
return () => {
7-
return {
8-
get double() {
9-
return count * 2;
10-
}
11-
}
12-
}
13-
}
14-
let {double} = $derived.by(create_derived());
3+
let double = $derived.by(() => count * 2);
154
</script>
165

176
<button on:click={() => count++}>{double}</button>

0 commit comments

Comments
 (0)