on:click svelte arguments code example
Example: on:click svelte arguments
function handleClick(x){
console.log(x);
//output: tree
}
<button on:click={() => handleClick("tree")}>
It works...
</button>
function handleClick(x){
console.log(x);
//output: tree
}
<button on:click={() => handleClick("tree")}>
It works...
</button>