Skip to content

Commit bb797e1

Browse files
committed
fix in correct place
1 parent e9667bf commit bb797e1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/svelte/messages/client-warnings/warnings.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ The easiest way to log a value as it changes over time is to use the [`$inspect`
5252
5353
> 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
5454
55-
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.
55+
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 (or in the case of an `<iframe>`, for the frame to be reloaded), even if they resolve to the same resource.
5656
57-
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:
57+
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:
5858
5959
```svelte
6060
<script>
@@ -83,9 +83,9 @@ To fix this, either silence the warning with an ignore comment, or ensure that t
8383
8484
> 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
8585
86-
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.
86+
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.
8787
88-
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:
88+
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:
8989
9090
```svelte
9191
<script>
@@ -168,7 +168,7 @@ Consider the following code:
168168
169169
`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.
170170
171-
To fix it, either create callback props to communicate via events with `App`, or mark `person` as [`$bindable`]($bindable).
171+
To fix it, either create callback props to communicate changes, or mark `person` as [`$bindable`]($bindable).
172172
173173
## reactive_declaration_non_reactive_property
174174

0 commit comments

Comments
 (0)