Repository navigation
iAPI Router: Prevent a race condition waiting for new styles during client-side navigation - #10
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
There was a problem hiding this comment.
It looks good, but I have a couple of questions.
Also, I think we should rethink when actions.prefetch should be resolved. Certainly after the HTML and CSS have been loaded, what I'm not so sure about is the preloading of the scripts. But maybe we can leave that decision for this PR:
luisherranz
left a comment
There was a problem hiding this comment.
Perfect. Thank you very much, David. Great tests, as always 🙂
|
Thanks @luisherranz! Whenever you have time, this PR was built on top of #9. That one also needs a review. 😊 |
Warning
Developed on top of #9. Wait for that PR to be merged until merging this.
What?
Prevents a potential race condition that could happen while handling styles during client-side navigation. Mentioned in #2 (comment).
Why?
During a client-side navigation, the
renderRegionsfunction was wrongly waiting for styles to be ready. A pending style sheet could delay a render and cause an unexpected render after a more recent navigation.How?
Moving the waiting logic inside
regionsToVdomfor both styles and js modules. The modules part will be revisited at #6.