0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-11-29 16:36:44 +01:00
svelte/documentation/examples/01-reactivity/00-reactive-assignments/App.svelte

13 lines
173 B
Svelte
Raw Normal View History

2019-03-10 20:53:01 +01:00
<script>
let count = 0;
function handleClick() {
count += 1;
}
</script>
<button on:click={handleClick}>
2023-05-14 07:50:43 +02:00
Clicked {count}
{count === 1 ? 'time' : 'times'}
</button>