-
Notifications
You must be signed in to change notification settings - Fork 794
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: componentDidLoad
is called in parent before children have loaded
#3580
bug: componentDidLoad
is called in parent before children have loaded
#3580
Comments
Hello @mpayson, thanks for filing this issue and for providing a reproduction repo! It's a big help for us when triaging issues. I'm able to confirm the behavior that you describe and that it doesn't match up with what's described in the Stencil documentation. I'm going to label this so it gets ingested into our backlog and the Stencil team can prioritize it. Thanks again for filing! |
This is still present in 4.0.5, I experienced this in our UI-Kit. It fails with synchronous |
I ran some tests and I noticed the following:
|
) Fixes: #3580 STENCIL-565
A fix for this bug has been published in Stencil |
Prerequisites
Stencil Version
2.17.4
Current Behavior
The
componentDidLoad
lifecycle method is called in a parent before its children have loadedExpected Behavior
componentDidLoad
is called after all the children have loaded as described in the documentation: https://stenciljs.com/docs/component-lifecycle#lifecycle-hierarchySteps to Reproduce
yarn
yarn vite
Note, the demo uses the
index.html
page and loads the built stencil components. The source code for the stencil components is in thesrc/
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!
The text was updated successfully, but these errors were encountered: