-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed as not planned
Description
Describe the bug
It was my understanding that we want mutating a map to also trigger reactivity.
Whether by design or by bug, this doesn't work now
<script>
let a = $state(new Map())
let count = $state(1);
// this doesn't go beyond "init"
$inspect(a);
function onclick(){
a.set(count, count);
count++;
// uncomment below to fix
// a = new Map(a);
}
</script>
<button {onclick}>{count}</button>
<!-- this stays empty -->
{[...a.keys()]}Reproduction
Logs
System Info
replSeverity
annoyance
Metadata
Metadata
Assignees
Labels
No labels