Skip to content

Commit f3e0db1

Browse files
authored
docs: incorrect order of directives (#9414)
The event listener must be registered before the event is dispatched in order for this code snippet to work.
1 parent 022c47e commit f3e0db1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

documentation/docs/03-runtime/07-svelte-action.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Sometimes actions emit custom events and apply custom attributes to the element
7272
}
7373
</script>
7474
75-
<div use:foo={{ prop: 'someValue' }} on:emit={handleEmit} />
75+
<div on:emit={handleEmit} use:foo={{ prop: 'someValue' }} />
7676
```
7777

7878
## Types

0 commit comments

Comments
 (0)