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/compile-warnings.md
-6Lines changed: 0 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -654,12 +654,6 @@ HTML restricts where certain elements can appear. In case of a violation the bro
654
654
655
655
This code will work when the component is rendered on the client (which is why this is a warning rather than an error), but if you use server rendering it will cause hydration to fail.
656
656
657
-
### non_reactive_update
658
-
659
-
```
660
-
`%name%` is updated, but is not declared with `$state(...)`. Changing its value will not correctly trigger updates
Copy file name to clipboardExpand all lines: packages/svelte/src/compiler/warnings.js
+8-10Lines changed: 8 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -97,7 +97,6 @@ export const codes = [
97
97
"options_renamed_ssr_dom",
98
98
"export_let_unused",
99
99
"legacy_component_creation",
100
-
"non_reactive_update",
101
100
"perf_avoid_inline_class",
102
101
"perf_avoid_nested_class",
103
102
"reactive_declaration_invalid_placement",
@@ -600,15 +599,6 @@ export function legacy_component_creation(node) {
600
599
w(node,"legacy_component_creation","Svelte 5 components are no longer classes. Instantiate them using `mount` or `hydrate` (imported from 'svelte') instead.");
601
600
}
602
601
603
-
/**
604
-
* `%name%` is updated, but is not declared with `$state(...)`. Changing its value will not correctly trigger updates
605
-
* @param {null | NodeLike} node
606
-
* @param {string} name
607
-
*/
608
-
exportfunctionnon_reactive_update(node,name){
609
-
w(node,"non_reactive_update",`\`${name}\` is updated, but is not declared with \`$state(...)\`. Changing its value will not correctly trigger updates`);
610
-
}
611
-
612
602
/**
613
603
* Avoid 'new class' — instead, declare the class at the top level scope
614
604
* @param {null | NodeLike} node
@@ -641,6 +631,14 @@ export function reactive_declaration_module_script_dependency(node) {
641
631
w(node,"reactive_declaration_module_script_dependency","Reassignments of module-level declarations will not cause reactive statements to update");
642
632
}
643
633
634
+
/**
635
+
* Properties of objects and arrays are not reactive unless in runes mode. Changes to this property will not cause the reactive statement to update
w(node,"reactive_declaration_non_reactive_property","Properties of objects and arrays are not reactive unless in runes mode. Changes to this property will not cause the reactive statement to update");
640
+
}
641
+
644
642
/**
645
643
* State referenced in its own scope will never update. Did you mean to reference it inside a closure?
0 commit comments