Skip to content

fix(runtime): async load order improvements; guarantee parent / child order contract - #6823

Merged
johnjenkins merged 2 commits into
v5from
v5-fix-lazy-lifecycle-order
Aug 11, 2026
Merged

fix(runtime): async load order improvements; guarantee parent / child order contract#6823
johnjenkins merged 2 commits into
v5from
v5-fix-lazy-lifecycle-order

Conversation

@johnjenkins

@johnjenkins johnjenkins commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

What is the current behavior?

GitHub Issue Number: #6636 (and more)

For any tree of Stencil components, regardless of which output is used, this should be the order:

  • connectedCallback fires top-down - never before the nearest Stencil ancestor's has fully completed.
  • componentWillLoad fires top-down, after descendants have connected - never before every already-present Stencil descendant's connectedCallback has fired. (The core bug: component's child initial timing leads to unexpected behavior #6636 fix.)
  • componentDidLoad fires bottom-up — never before all descendants' componentDidLoads have

This should be true no-matter if using the lazy loader, standalone components or the standalone auto-loader .. at present this is not the case. Network latency (for example) can cause this lifecycle of events to fire out-of-order.

What is the new behavior?

The contract is enforced

Documentation

Does this introduce a breaking change?

  • Yes
  • No

Not strictly - but could be a change in expectation if someone is currently relying on a particular order.

Testing

Other information

@johnjenkins
johnjenkins requested a review from a team as a code owner August 11, 2026 14:05
@johnjenkins johnjenkins changed the title fix(runtime): load order improvements; guarantee parent / child order contract fix(runtime): async load order improvements; guarantee parent / child order contract Aug 11, 2026
@johnjenkins
johnjenkins merged commit e7912c9 into v5 Aug 11, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant