mirror of https://github.com/sveltejs/svelte
parent
1998739524
commit
253615fed5
@ -1,8 +1,8 @@
|
||||
<script>
|
||||
export let x = 0;
|
||||
|
||||
$: x *= 2;
|
||||
$: x *= 2;
|
||||
</script>
|
||||
|
||||
<button on:click='{() => x += 1}'>+1</button>
|
||||
<p>count:{x}</p>
|
||||
<p>count: {x}</p>
|
||||
|
@ -1,12 +1,12 @@
|
||||
<script>
|
||||
export let x = 0;
|
||||
|
||||
$: x++;
|
||||
$: x++;
|
||||
|
||||
function onClick() {
|
||||
x += 1;
|
||||
}
|
||||
function onClick() {
|
||||
x += 1;
|
||||
}
|
||||
</script>
|
||||
|
||||
<button on:click='{() => x += 1}'>+1</button>
|
||||
<p>count:{x}</p>
|
||||
<p>count: {x}</p>
|
||||
|
Loading…
Reference in new issue