Skip to content

Commit 3974ab1

Browse files
committed
refactor(InstantReload): use $props for foo and bar
Refactor to destructure foo and bar from $props() instead of using export let. This aligns with updated Svelte 5 props handling.
1 parent 5cf5e5c commit 3974ab1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
import { Deferred, router } from '@inertiajs/svelte5'
33
import { onMount } from 'svelte'
44
5-
export let foo: { text: string } | undefined
6-
export let bar: { text: string } | undefined
5+
const { foo, bar }: { foo?: { text: string }; bar?: { text: string } } = $props()
76
87
onMount(() => {
98
router.reload({

0 commit comments

Comments
 (0)