Skip to content

Commit b37676e

Browse files
Sync svelte docs (#1279)
sync svelte docs Co-authored-by: svelte-docs-bot[bot] <196124396+svelte-docs-bot[bot]@users.noreply.github.com>
1 parent fa82e82 commit b37676e

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

apps/svelte.dev/content/docs/svelte/98-reference/.generated/client-warnings.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ Tried to unmount a component that was not mounted
161161
### ownership_invalid_binding
162162

163163
```
164-
%parent% passed a value to %child% with `bind:`, but the value is owned by %owner%. Consider creating a binding between %owner% and %parent%
164+
%parent% passed property `%prop%` to %child% with `bind:`, but its parent component %owner% did not declare `%prop%` as a binding. Consider creating a binding between %owner% and %parent% (e.g. `bind:%prop%={...}` instead of `%prop%={...}`)
165165
```
166166

167167
Consider three components `GrandParent`, `Parent` and `Child`. If you do `<GrandParent bind:value>`, inside `GrandParent` pass on the variable via `<Parent {value} />` (note the missing `bind:`) and then do `<Child bind:value>` inside `Parent`, this warning is thrown.
@@ -171,11 +171,7 @@ To fix it, `bind:` to the value instead of just passing a property (i.e. in this
171171
### ownership_invalid_mutation
172172
173173
```
174-
Mutating a value outside the component that created it is strongly discouraged. Consider passing values to child components with `bind:`, or use a callback instead
175-
```
176-
177-
```
178-
%component% mutated a value owned by %owner%. This is strongly discouraged. Consider passing values to child components with `bind:`, or use a callback instead
174+
Mutating unbound props (`%name%`, at %location%) is strongly discouraged. Consider using `bind:%prop%={...}` in %parent% (or using a callback) instead
179175
```
180176
181177
Consider the following code:

apps/svelte.dev/content/docs/svelte/98-reference/30-runtime-warnings.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ Tried to unmount a component that was not mounted
168168
### ownership_invalid_binding
169169

170170
```
171-
%parent% passed a value to %child% with `bind:`, but the value is owned by %owner%. Consider creating a binding between %owner% and %parent%
171+
%parent% passed property `%prop%` to %child% with `bind:`, but its parent component %owner% did not declare `%prop%` as a binding. Consider creating a binding between %owner% and %parent% (e.g. `bind:%prop%={...}` instead of `%prop%={...}`)
172172
```
173173

174174
Consider three components `GrandParent`, `Parent` and `Child`. If you do `<GrandParent bind:value>`, inside `GrandParent` pass on the variable via `<Parent {value} />` (note the missing `bind:`) and then do `<Child bind:value>` inside `Parent`, this warning is thrown.
@@ -178,11 +178,7 @@ To fix it, `bind:` to the value instead of just passing a property (i.e. in this
178178
### ownership_invalid_mutation
179179
180180
```
181-
Mutating a value outside the component that created it is strongly discouraged. Consider passing values to child components with `bind:`, or use a callback instead
182-
```
183-
184-
```
185-
%component% mutated a value owned by %owner%. This is strongly discouraged. Consider passing values to child components with `bind:`, or use a callback instead
181+
Mutating unbound props (`%name%`, at %location%) is strongly discouraged. Consider using `bind:%prop%={...}` in %parent% (or using a callback) instead
186182
```
187183
188184
Consider the following code:

0 commit comments

Comments
 (0)