Fire source's propchange before cascading to dependents#119
Merged
Conversation
504f092 to
e144f56
Compare
6a9beff to
2d6e200
Compare
e144f56 to
70c36ac
Compare
2d6e200 to
65a893d
Compare
70c36ac to
c4e3cf8
Compare
65a893d to
7cc97fd
Compare
c4e3cf8 to
05ccdb9
Compare
7cc97fd to
2b667b9
Compare
05ccdb9 to
d1d74a5
Compare
LeaVerou
approved these changes
May 15, 2026
2b667b9 to
bd68789
Compare
d1d74a5 to
e163920
Compare
80acf81 to
94c292e
Compare
3625381 to
f7356e7
Compare
94c292e to
522905e
Compare
`Props.propChanged` previously cascaded to dependents first and fired the source's `propchange` event last. This meant `el.plain = 5` produced events for `computed` and `fnDefault` before the event for `plain` — surprising for listeners who expect to hear about the prop they just wrote to first. Swap the order: fire the source's event, then cascade. The cascade still runs synchronously and dependent events follow in declaration order. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
f7356e7 to
5d2dac7
Compare
522905e to
4610bd7
Compare
Member
Author
|
Note: this PR was auto-merged by GitHub as a side effect of a restack error — the head branch was force-pushed such that it became an ancestor of the base, which GitHub interprets as "already merged." The original commit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Props.propChangedpreviously cascaded to dependents first and fired the source'spropchangeevent last. This meantel.plain = 5produced events forcomputedandfnDefaultbefore the event forplain— surprising for listeners who expect to hear about the prop they just wrote to first.Swap the order: fire the source's event, then cascade. The cascade still runs synchronously and dependent events follow in declaration order.
Test impact
defaultProp re-fires when its source prop changes— was red on cascade-first order, now passes.default() with reactive deps: synthetic prop event fires before declaredandEvents fan out across plain, get, and default() props— both Roll back signals and batching and reimplement them #113 baseline tests had their expectations corrected upstream on theprops-behavioral-testsbranch (per #113 design clarification: synthetic default props are consumer-visible, analogous to.value/.defaultValueon native form controls). They were red until source-first ordering landed; this PR makes them pass.🤖 Generated with Claude Code