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
{{ message }}
Repository navigation
Solid v2.0.0-beta.10 batched parent & derived signals manual update is neglected for derived signals #2692
When updating parent signal and derived signal in one "batch", the derived signal update has no effect independent of update order.
const[original,setOriginal]=createSignal(0);const[derived,setDerived]=createSignal(original);functiononClick(){setOriginal(1);// sets both derived signals to 1setDerived(2);// doesn't do anything}
This happens only for first call of onClick, because on second call original signal already has new value and so doesn't update - this allows derived signal to update.
This can be mitigated right now with flush
functiononClick(){setOriginal(1);// sets both derived signals to 1flush();setDerived(2);// sets derived signal to 2}
but flush can't be used in e.g. onSettled
and flushing it at that point makes more updates
changed the title [-]Solid v2.0.0-beta.10 batched signals manual update is neglected for derived signals[/-][+]Solid v2.0.0-beta.10 batched parent & derived signals manual update is neglected for derived signals[/+]on May 4, 2026
There is still an open question about order. Making order matter would be pretty difficult because things don't evaluate immediately (without flush). So we have to take a side I believe write should override recompute, but order isn't going to matter here I think. Simply write trumps derivation on the same tick.
Derived Stores are trickier. The only way to be consistent is have them similarly cancel. It isn't really possible to enforce ordering and to know the state you are in coming in to either.
Activity
[-]Solid v2.0.0-beta.10 batched signals manual update is neglected for derived signals[/-][+]Solid v2.0.0-beta.10 batched parent & derived signals manual update is neglected for derived signals[/+]ryansolid commentedon May 4, 2026
There is still an open question about order. Making order matter would be pretty difficult because things don't evaluate immediately (without flush). So we have to take a side I believe write should override recompute, but order isn't going to matter here I think. Simply write trumps derivation on the same tick.
Derived Stores are trickier. The only way to be consistent is have them similarly cancel. It isn't really possible to enforce ordering and to know the state you are in coming in to either.
fix(signals): preserve manual writes to derived state (#2692)
ryansolid commentedon May 11, 2026
I just went with write beats derived in the same tick. Fixed in beta.11.
fix(signals): refresh() lifts a stale manual-write mask inside a tran…
fix(signals): refresh() lifts a stale manual-write mask inside a tran…
fix(signals): refresh() after a held manual write stays a quiet re-ask (
fix(signals): a held derivation is not a proposal — mainline writes b…
fix(signals): a derived write's mask lasts its frame, not the hold (#…
fix(signals): derived writes apply first, then derivations re-run (#3742
signals: the hold model (L2) — core rebuilt from its rulings; −23% fl…