Skip to content

Commit 35f92cf

Browse files
authored
docs: update runes api.md (#11877)
* Update 02-runes.md * Update 02-runes.md
1 parent 14ddb87 commit 35f92cf

File tree

1 file changed

+4
-4
lines changed
  • sites/svelte-5-preview/src/routes/docs/content/01-api

1 file changed

+4
-4
lines changed

sites/svelte-5-preview/src/routes/docs/content/01-api/02-runes.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Reactive state is declared with the `$state` rune:
1919
let count = $state(0);
2020
</script>
2121
22-
<button on:click={() => count++}>
22+
<button onclick={() => count++}>
2323
clicks: {count}
2424
</button>
2525
```
@@ -140,7 +140,7 @@ Derived state is declared with the `$derived` rune:
140140
+ let doubled = $derived(count * 2);
141141
</script>
142142

143-
<button on:click={() => count++}>
143+
<button onclick={() => count++}>
144144
{doubled}
145145
</button>
146146

@@ -187,7 +187,7 @@ Sometimes you need to create complex derivations that don't fit inside a short e
187187
});
188188
</script>
189189
190-
<button on:click={() => numbers.push(numbers.length + 1)}>
190+
<button onclick={() => numbers.push(numbers.length + 1)}>
191191
{numbers.join(' + ')} = {total}
192192
</button>
193193
```
@@ -279,7 +279,7 @@ An effect only reruns when the object it reads changes, not when a property insi
279279
});
280280
</script>
281281
282-
<button on:click={() => object.count++}>
282+
<button onclick={() => object.count++}>
283283
{derived_object.doubled}
284284
</button>
285285

0 commit comments

Comments
 (0)