From b575d37dca0428cfdd4e68c7377050f13e551d68 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Tue, 14 Nov 2023 14:08:38 -0500 Subject: [PATCH] add note on deprecation --- .../src/routes/docs/content/01-api/03-snippets.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sites/svelte-5-preview/src/routes/docs/content/01-api/03-snippets.md b/sites/svelte-5-preview/src/routes/docs/content/01-api/03-snippets.md index dc2e6baeda..e9f9f52a20 100644 --- a/sites/svelte-5-preview/src/routes/docs/content/01-api/03-snippets.md +++ b/sites/svelte-5-preview/src/routes/docs/content/01-api/03-snippets.md @@ -214,6 +214,12 @@ Any content inside the component tags that is _not_ a snippet declaration implic ``` +## Snippets and slots + +In Svelte 4, content can be passed to components using [slots](https://svelte.dev/docs/special-elements#slot). Snippets are more powerful and flexible, and as such slots are deprecated in Svelte 5. + +They continue to work, however, and you can mix and match snippets and slots in your components. + ## Typing snippets Right now, it's not possible to add types for snippets and their parameters. This is something we hope to address before we ship Svelte 5.