Skip to content

Update to $props() for legacy <svelte:self> #15160

@jaminwebdev

Description

@jaminwebdev

Describe the bug

https://svelte.dev/docs/svelte/legacy-svelte-self shows old prop declaration syntax:

<script>
	export let count;
</script>

{#if count > 0}
	<p>counting down... {count}</p>
	<svelte:self count={count - 1} />
{:else}
	<p>lift-off!</p>
{/if}

Should probably update to $props()

Reproduction

N/A

Logs

System Info

N/A

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions