Skip to content

Commit 5cf5e5c

Browse files
committed
refactor(ManyGroups): use $props for prop destructuring
Refactor prop declarations to use $props() for destructuring foo, bar, baz, qux, and quux. This improves consistency with Svelte 5 conventions and simplifies prop management.
1 parent 2426ec8 commit 5cf5e5c

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

packages/svelte5/test-app/Pages/DeferredProps/ManyGroups.svelte

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
<script lang="ts">
22
import { Deferred, inertia } from '@inertiajs/svelte5'
33
4-
export let foo: { text: string } | undefined
5-
export let bar: { text: string } | undefined
6-
export let baz: { text: string } | undefined
7-
export let qux: { text: string } | undefined
8-
export let quux: { text: string } | undefined
4+
const { foo, bar, baz, qux, quux }: {
5+
foo?: { text: string };
6+
bar?: { text: string };
7+
baz?: { text: string };
8+
qux?: { text: string };
9+
quux?: { text: string };
10+
} = $props()
911
</script>
1012

1113
<Deferred data="foo">

0 commit comments

Comments
 (0)