Commit c987634
committed
fix: emit current property value immediately in listener effect
Legacy addListener does NOT emit on subscribe — only on changes.
Without this, hooks stayed undefined forever if the value never changed.
Now the effect reads property.value synchronously when subscribing,
then the listener handles subsequent updates.1 parent fd3c324 commit c987634
1 file changed
+8
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
70 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
71 | 77 | | |
72 | 78 | | |
73 | 79 | | |
| |||
0 commit comments