svelte/test/hydration/samples/event-handler/main.html

5 lines
97 B

<button on:click='set({ clicked: true })'>click me</button>
{#if clicked}
<p>clicked!</p>
{/if}