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
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.
▶
[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:18
System Info
Svelte 5.11.2, Rocky Linux, chrome, firefox
Severity
annoyance
The text was updated successfully, but these errors were encountered:
Bladesheng
changed the title
False assignment_value_stale warning when storing state in class and using bind:group
False assignment_value_stale warning when storing state in class and using bind:groupDec 12, 2024
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
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: