You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 28, 2023. It is now read-only.
As discussed here, it looks like the setTimeout callback we are using inside connectedCallback is not 100% reliable. It seems to be running before the HTML parsing has finished. Here you have one example of when this is a problem:
It seems that if the page is loaded quickly, the state defined in PHP and sent as an attribute is undefined in the view.js files. These are the two examples I'm talking about: Title & Date.
As Luis shared here, Jake Archibald talks about this problem in this video. He proposes:
A weird custom element hack that can inform the parent when it's rendered, because at that moment, all the children should be rendered as well:
<wp-block><!-- children is processed first -->
children...
<!-- then this final element is processed --><children-finished-processing></children-finished-processing></wp-block>