docs: note null/undefined breaking change

closes #10043
pull/10076/head
Simon Holthausen 6 months ago
parent 2133d7d67a
commit 2a0097e4ee

@ -107,3 +107,7 @@ In Svelte 4, it was possible to specify event attributes on HTML elements as a s
```
This is not recommended, and is no longer possible in Svelte 5, where properties like `onclick` replace `on:click` as the mechanism for adding [event handlers](/docs/event-handlers).
### `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.

Loading…
Cancel
Save