Skip to content

Commit bfa328e

Browse files
committed
note breaking change
1 parent 432be5a commit bfa328e

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.changeset/heavy-ducks-leave.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"svelte": patch
33
---
44

5-
fix: robustify interop of exports and props
5+
breaking: robustify interop of exports and props in runes mode

sites/svelte-5-preview/src/routes/docs/content/03-appendix/02-breaking-changes.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,18 @@ Svelte now use Mutation Observers instead of IFrames to measure dimensions for `
117117

118118
Content inside component tags becomes a [snippet prop](/docs/snippets) called `children`. You cannot have a separate prop by that name.
119119

120+
## Breaking changes in runes mode
121+
122+
Some breaking changes only apply once your component is in runes mode.
123+
124+
### Bindings to component exports don't show up in rest props
125+
126+
In runes mode, bindings to component exports don't show up in rest props. For example, `rest` in `let { foo, bar, ...rest } = $props();` would not contain `baz` if `baz` was defined as `export const baz = ...;` inside the component. In Svelte 4 syntax, the equivalent to `rest` would be `$$restProps`, which contains these component exports.
127+
128+
### Bindings need to be explicitly defined using `$bindable()`
129+
130+
In Svelte 4 syntax, every property (declared via `export let`) is bindable, meaning you can `bind:` to it. In runes mode, properties are not bindable by default: you need to denote bindable props with the [/docs/runes#$bindable](`$bindable`) rune.
131+
120132
## Other breaking changes
121133

122134
### Stricter `@const` assignment validation

0 commit comments

Comments
 (0)