You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
+layout.svelte file requires either a <slot /> or {@render children()} to render child routes.
However in Svelte 5 if we use {@render children()} we will get this warning in the console:
src/routes/+layout.svelte
`<slot />` missing — inner content will not be rendered
Adding this commented line will hide the warning <!-- <slot /> -->
Describe the bug
+layout.svelte file requires either a
<slot />
or{@render children()}
to render child routes.However in Svelte 5 if we use
{@render children()}
we will get this warning in the console:Adding this commented line will hide the warning
<!-- <slot /> -->
Reproduction
This simple REPL demonstrates the issue:
https://www.sveltelab.dev/f16ajcfi2z70ueq?files=.%2Fsrc%2Froutes%2F%2Blayout.svelte
(see the console)
Logs
src/routes/+layout.svelte `<slot />` missing — inner content will not be rendered
Severity
annoyance
The text was updated successfully, but these errors were encountered: