-
-
Notifications
You must be signed in to change notification settings - Fork 835
bug: componentDidLoad is called in parent before children have loaded #3580
Copy link
Copy link
Closed
AnirudhJalagam/ionic-frameworkss
#2Labels
Bug: ValidatedThis PR or Issue is verified to be a bug within StencilThis PR or Issue is verified to be a bug within Stencil
Description
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Stencil Version
2.17.4
Current Behavior
The componentDidLoad lifecycle method is called in a parent before its children have loaded
Expected Behavior
componentDidLoad is called after all the children have loaded as described in the documentation: https://stenciljs.com/docs/component-lifecycle#lifecycle-hierarchy
Steps to Reproduce
- Clone the reproduction URL
- Install dependencies
yarn - Run then open the demo page
yarn vite - Open the developer console
- Notice "PARENT LOADED" is logged before "CHILD LOADED"
Note, the demo uses the index.html page and loads the built stencil components. The source code for the stencil components is in the src/ directory.
Code Reproduction URL
https://github.com/mpayson/stencil-debug
Additional Information
I was also able to reproduce this issue with another application setup (React + Webpack). Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Bug: ValidatedThis PR or Issue is verified to be a bug within StencilThis PR or Issue is verified to be a bug within Stencil