Update 03-template-syntax.md

Added explanation on double event handlers that propagate to the parent. To make sure the developer understands the true power of adding multiple handlers. (and I have been in a situation forgetting about this, which took me a while to figure out).
pull/8048/head
Tommertom 4 years ago committed by GitHub
parent 91f8764145
commit 13873fb886
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -572,6 +572,13 @@ It's possible to have multiple event listeners for the same event:
<button on:click={increment} on:click={track}>Click me!</button> <button on:click={increment} on:click={track}>Click me!</button>
``` ```
But also this is possible:
```sv
<button on:click on:click>
This component will emit the click event TWICE to its parent!!
</button>
```
#### bind:*property* #### bind:*property*
```sv ```sv

Loading…
Cancel
Save