-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
fix(custom-elements): ensure props are available before initial render (fix #4716)) #4792
Conversation
asyncDef().then(resolve) | ||
asyncDef() | ||
.then(resolve) | ||
.then(() => this._update()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is necessary to have the asyncWrapper's props updated before it renders the nested actual component.
Without this, the async Component test case fails now.
Sidenote: I'm not sure yet if this also fixes #4789 as that one doesn't involve a number prop. But I couldn't identify another part of the code that could be responsible yet. |
What's holding up this merge request getting approved? |
Time |
I refactored the resolve call a bit more and I believe 4b7f76e should be a more efficient fix (it avoids some unnecessary |
This PR fixes a case where props with type "Number" lead to a premature first render - before the initial component props have been collected from the DOM element properties that have been set.
close #4716