Skip to content

Commit 56e25a8

Browse files
committed
refactor(test-app): use $props destructuring in pages
Refactor Page2.svelte and InvalidateTags.svelte to use $props destructuring instead of export let for props. This improves consistency and leverages the recommended Svelte 5 pattern.
1 parent 3974ab1 commit 56e25a8

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<script lang="ts">
22
import { Deferred } from '@inertiajs/svelte5'
33
4-
export let baz: string | undefined
5-
export let qux: string | undefined
4+
const { baz, qux }: { baz?: string; qux?: string } = $props()
65
</script>
76

87
<Deferred data="baz">

packages/svelte5/test-app/Pages/FormComponent/InvalidateTags.svelte

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<script lang="ts">
22
import { Link, Form } from '@inertiajs/svelte5'
33
4-
export let lastLoaded
5-
export let propType
4+
const { lastLoaded, propType } = $props()
65
</script>
76

87
<div>

0 commit comments

Comments
 (0)