Skip to content

Commit b575d37

Browse files
committed
add note on deprecation
1 parent ce8c05d commit b575d37

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

sites/svelte-5-preview/src/routes/docs/content/01-api/03-snippets.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,12 @@ Any content inside the component tags that is _not_ a snippet declaration implic
214214
</table>
215215
```
216216

217+
## Snippets and slots
218+
219+
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.
220+
221+
They continue to work, however, and you can mix and match snippets and slots in your components.
222+
217223
## Typing snippets
218224

219225
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.

0 commit comments

Comments
 (0)