Hacker News new | ask | show | jobs
by anonzzzies 924 days ago
I never used svelte, so it’s probably a weird question, but how is increment() called?
1 comments

The calling location has been omitted from the snippet. You don't need to do anything special to call it, just `increment()` wherever it's in scope.

`<button on:click={() => increment()}>+</button>`