From 35b500c399e892a7b5da0c396436c52fae0750f6 Mon Sep 17 00:00:00 2001 From: Simon Holthausen Date: Fri, 19 Jan 2024 14:10:31 +0100 Subject: [PATCH] docs: note `bind:files` breaking change closes #10032 --- .../routes/docs/content/03-appendix/02-breaking-changes.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sites/svelte-5-preview/src/routes/docs/content/03-appendix/02-breaking-changes.md b/sites/svelte-5-preview/src/routes/docs/content/03-appendix/02-breaking-changes.md index 156104a126..a03cf3da3c 100644 --- a/sites/svelte-5-preview/src/routes/docs/content/03-appendix/02-breaking-changes.md +++ b/sites/svelte-5-preview/src/routes/docs/content/03-appendix/02-breaking-changes.md @@ -111,3 +111,7 @@ This is not recommended, and is no longer possible in Svelte 5, where properties ### `null` and `undefined` become the empty string In Svelte 4, `null` and `undefined` were printed as the corresponding string. In 99 out of 100 cases you want this to become the empty string instead, which is also what most other frameworks out there do. Therefore, in Svelte 5, `null` and `undefined` become the empty string. + +### `bind:files` values can only be `null`, `undefined` or `FileList` + +`bind:files` is now a two-way binding. As such, when setting a value, it needs to be either falsy (`null` or `undefined`) or of type `FileList`.