1 comment

[ 3.2 ms ] story [ 20.9 ms ] thread
I keep seeing the same error "Using `<slot>` to render parent content is deprecated. Use `{@render ...}` tags instead", yet no where in any of the Svelte 5 preview docs does it show a practical example of how to use {@render ...} in `+layout.svelte` files. I'm sure it is very useful to to use slot in components, but in Svelte 4, working with `+layout.svelte` used to be dead simple, but now Svelte 5 is a mess of poorly documented APIs.

Can some show a simple example of:

`/src/routes/+page.svelte'/`/src/routes/+layout.svelte` (one slot)

`/src/routes/subpage/+page.svelte'/`/src/routes/subpage/+layout.svelte` (two slots)

#Svelte #Sveltekit #Runes #layout