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: apps/svelte.dev/content/docs/svelte/98-reference/.generated/client-warnings.md
-40Lines changed: 0 additions & 40 deletions
Original file line number
Diff line number
Diff line change
@@ -204,46 +204,6 @@ Consider the following code:
204
204
205
205
To fix it, either create callback props to communicate changes, or mark `person` as [`$bindable`]($bindable).
206
206
207
-
### reactive_declaration_non_reactive_property
208
-
209
-
```
210
-
A`$:`statement (%location%) read reactive state that was not visible to the compiler. Updates to this state will not cause the statement to re-run. The behaviour ofthis code will change if you migrate it to runes mode
211
-
```
212
-
213
-
In legacy mode, a `$:` [reactive statement](https://svelte.dev/docs/svelte/legacy-reactive-assignments) re-runs when the state it _references_ changes. This is determined at compile time, by analysing the code.
214
-
215
-
In runes mode, effects and deriveds re-run when there are changes to the values that are read during the function's _execution_.
216
-
217
-
Often, the result is the same — for example these can be considered equivalent:
218
-
219
-
```js
220
-
let a =1, b =2, sum =3;
221
-
// ---cut---
222
-
$: sum = a + b;
223
-
```
224
-
225
-
```js
226
-
let a =1, b =2;
227
-
// ---cut---
228
-
constsum=$derived(a + b);
229
-
```
230
-
231
-
In some cases — such as the one that triggered the above warning — they are _not_ the same:
232
-
233
-
```js
234
-
let a =1, b =2, sum =3;
235
-
// ---cut---
236
-
constadd= () => a + b;
237
-
238
-
// the compiler can't 'see' that `sum` depends on `a` and `b`, but
239
-
// they _would_ be read while executing the `$derived` version
240
-
$: sum =add();
241
-
```
242
-
243
-
Similarly, reactive properties of [deep state](https://svelte.dev/docs/svelte/$state#Deep-state) are not visible to the compiler. As such, changes to these properties will cause effects and deriveds to re-run but will _not_ cause `$:` statements to re-run.
244
-
245
-
When you [migrate this component](https://svelte.dev/docs/svelte/v5-migration-guide) to runes mode, the behaviour will change accordingly.
Copy file name to clipboardExpand all lines: apps/svelte.dev/content/docs/svelte/98-reference/30-runtime-warnings.md
-40Lines changed: 0 additions & 40 deletions
Original file line number
Diff line number
Diff line change
@@ -211,46 +211,6 @@ Consider the following code:
211
211
212
212
To fix it, either create callback props to communicate changes, or mark `person` as [`$bindable`]($bindable).
213
213
214
-
### reactive_declaration_non_reactive_property
215
-
216
-
```
217
-
A`$:`statement (%location%) read reactive state that was not visible to the compiler. Updates to this state will not cause the statement to re-run. The behaviour ofthis code will change if you migrate it to runes mode
218
-
```
219
-
220
-
In legacy mode, a `$:` [reactive statement](https://svelte.dev/docs/svelte/legacy-reactive-assignments) re-runs when the state it _references_ changes. This is determined at compile time, by analysing the code.
221
-
222
-
In runes mode, effects and deriveds re-run when there are changes to the values that are read during the function's _execution_.
223
-
224
-
Often, the result is the same — for example these can be considered equivalent:
225
-
226
-
```js
227
-
let a =1, b =2, sum =3;
228
-
// ---cut---
229
-
$: sum = a + b;
230
-
```
231
-
232
-
```js
233
-
let a =1, b =2;
234
-
// ---cut---
235
-
constsum=$derived(a + b);
236
-
```
237
-
238
-
In some cases — such as the one that triggered the above warning — they are _not_ the same:
239
-
240
-
```js
241
-
let a =1, b =2, sum =3;
242
-
// ---cut---
243
-
constadd= () => a + b;
244
-
245
-
// the compiler can't 'see' that `sum` depends on `a` and `b`, but
246
-
// they _would_ be read while executing the `$derived` version
247
-
$: sum =add();
248
-
```
249
-
250
-
Similarly, reactive properties of [deep state](https://svelte.dev/docs/svelte/$state#Deep-state) are not visible to the compiler. As such, changes to these properties will cause effects and deriveds to re-run but will _not_ cause `$:` statements to re-run.
251
-
252
-
When you [migrate this component](https://svelte.dev/docs/svelte/v5-migration-guide) to runes mode, the behaviour will change accordingly.
0 commit comments