-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Description
Describe the bug
I am getting the assignment_value_stale warning when I store state in a class and then bind that state to group of checkboxes. According to the docs, I believe in this case the warning is not relevant and should not be printed.
Everything else works as expected though.
When the state is not stored in a class, there is no warning (correct).
When $state.raw([]) is used instead, there is also no warning.
This feels similar to #14643
Reproduction
https://svelte.dev/playground/59525517cbb8474ca7db39aacfa98586?version=5.11.2
Logs
▶
[svelte] assignment_value_stale
Assignment to `selectedOptions` property (App.svelte:19:14) will evaluate to the right-hand side, not the value of `selectedOptions` following the assignment. This may result in unexpected behaviour.
https://svelte.dev/e/assignment_value_stale
eval
playground:output:4148:47
untrack
playground:output:2696:11
console.warn
playground:output:4148:16
assignment_value_stale
playground:output:476:12
compare
playground:output:2819:4
assign
playground:output:2832:10
eval
playground:output:4104:18System Info
Svelte 5.11.2, Rocky Linux, chrome, firefoxSeverity
annoyance
rodrigocfd and vadirn
Metadata
Metadata
Assignees
Labels
No labels