I am looking to update my HTML navigation
<div id="header-wrapper">
<div id="header-logo-title">
<nav>
<ul id='mainNav'>
<li>Home</li>
</ul>
</nav>
</div>
</div>
by incorporating a VUE component like so:
<navigation>
<nav-item>Home</nav-item>
</navigation>
I recently learned about the importance of extracting CSS in order to avoid issues such as flash of unstyled content, as explained here:
When using Single-File Components, the CSS inside components are injected dynamically as tags via JavaScript. This has a small runtime cost, and if you are using server-side rendering it will cause a “flash of unstyled content”. Extracting the CSS across all components into the same file will avoid these issues, and also result in better CSS minification and caching.
Despite moving my component's CSS into a separate file, I am still encountering flash of unstyled content upon loading the page.
Could this issue be related to replacing
<navigation>..</navigaton>
with
<div id="header-wrapper">
<div id="header-logo-title">
<nav>
<ul id='mainNav'>
....
</ul>
</nav>
</div>
</div>
using VUE? And if so, how can I prevent this from happening?