You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/docs/98-reference/.generated/client-warnings.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,9 +66,9 @@ The easiest way to log a value as it changes over time is to use the [`$inspect`
66
66
The `%attribute%` attribute on `%html%` changed its value between server and client renders. The client value, `%value%`, will be ignored in favour of the server value
67
67
```
68
68
69
-
Certain attributes like `src` on an `<img>` element will not be repaired during hydration, i.e. the server value will be kept. That's because for some attributes it is very expensive to properly calculate whether or not their value has really changed.
69
+
Certain attributes like `src` on an `<img>` element will not be repaired during hydration, i.e. the server value will be kept. That's because updating these attributes can cause the image to be refetched (orinthecaseofan`<iframe>`, fortheframetobereloaded), even if they resolve to the same resource.
70
70
71
-
To fix this, either silence the warning with an ignore comment, or ensure that the value stays the same between server and client. If you really need the value to change on hydration, you can force an update like this:
71
+
To fix this, either silence the warning with a [`svelte-ignore`](basic-markup#Comments) comment, or ensure that the value stays the same between server and client. If you really need the value to change on hydration, you can force an update like this:
72
72
73
73
```svelte
74
74
<script>
@@ -101,9 +101,9 @@ The value of an `{@html ...}` block changed between server and client renders. T
101
101
The value of an `{@html ...}` block %location% changed between server and client renders. The client value will be ignored in favour of the server value
102
102
```
103
103
104
-
If the a `{@html ...}` value changes between the server and the client, it will not be repaired during hydration, i.e. the server value will be kept. That's because it is very expensive to properly calculate whether or not their value have really changed.
104
+
If the `{@html ...}` value changes between the server and the client, it will not be repaired during hydration, i.e. the server value will be kept. That's because change detection during hydration is expensive and usually unnecessary.
105
105
106
-
To fix this, either silence the warning with an ignore comment, or ensure that the value stays the same between server and client. If you really need the value to change on hydration, you can force an update like this:
106
+
To fix this, either silence the warning with a [`svelte-ignore`](basic-markup#Comments) comment, or ensure that the value stays the same between server and client. If you really need the value to change on hydration, you can force an update like this:
107
107
108
108
```svelte
109
109
<script>
@@ -202,7 +202,7 @@ Consider the following code:
202
202
203
203
`Child` is mutating `person` which is owned by `App` without being explicitly "allowed" to do so. This is strongly discouraged since it can create code that is hard to reason about at scale ("who mutated this value?"), hence the warning.
204
204
205
-
To fix it, either create callback props to communicate via events with `App`, or mark `person` as [`$bindable`]($bindable).
205
+
To fix it, either create callback props to communicate changes, or mark `person` as [`$bindable`]($bindable).
0 commit comments