Skip to content

Commit 1456278

Browse files
authored
greet instead of onGreet
1 parent 1e78a8f commit 1456278

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

sites/svelte-5-preview/src/routes/docs/content/03-appendix/03-deprecations.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,11 @@ Svelte 5 introduces [event attributes](/docs/event-handlers) which deprecate eve
5050
<script>
5151
- import { createEventDispatcher } from 'svelte';
5252
- const dispatch = createEventDispatcher();
53-
+ let { onGreet } = $props();
53+
+ let { greet } = $props();
5454

55-
function greet() {
55+
- function greet() {
5656
- dispatch('greet');
57-
+ onGreet?.();
58-
}
57+
- }
5958
</script>
6059

6160
<button

0 commit comments

Comments
 (0)