Commit 8b84f79
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 f4493c0 commit 8b84f79
1 file changed
Lines changed: 8 additions & 2 deletions
| 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