Skip to content

Svelte 5: missing inner content warning if children prop is forwarded #13504

@fehnomenal

Description

@fehnomenal

Describe the bug

Like in #11127 the warning

src/routes/+layout.svelte
`<slot />` or `{@render ...}` tag missing — inner content will not be rendered

is printed even though my layout forwards the children prop to another component which displays it then.

Reproduction

See: https://stackblitz.com/edit/sveltejs-kit-template-default-u9oiqqaf

The +layout.svelte consists of only this:

<script>
	import Layout from './Layout.svelte';

	/** @type {{children: import('svelte').Snippet}} */
	let { children } = $props();
</script>

<Layout {children} />

Logs

System Info

Does not matter

Severity

annoyance

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedPRs welcomed. The implementation details are unlikely to cause debatesvelte 5

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions