-
I modified Home.razor to this...
The fluentui styles were not loaded at the start of the count. Is this a known limitation? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It wasn't know yet, but it is now 😉! What happens is that the web components script (that loads the styling) is called after lazorhas started and that isn't until the
That way you are basically jumpstarting the web components script yourself ahead of Blazor doing it. JavaScript handles the loading of the script twice perfectly fine. The best solution is still to not do any blocking work in a SSR based home page. If you then want to prevent the flash of unstyled content, see https://www.fluentui-blazor.net/DesignTheme#how-to-remove-the-%22bright-flash%22-on-loading |
Beta Was this translation helpful? Give feedback.
It wasn't know yet, but it is now 😉!
What happens is that the web components script (that loads the styling) is called after lazorhas started and that isn't until the
OnInitializedAsync
is done. There is nothing we can do about that.What you can do is add the following in your
App.razor
after the<Routes />
component:That way you are basically jumpstarting the web components script yourself ahead of Blazor doing it. JavaScript handles the loading of the script twice perfectly fine.
There will still be a flash but it will at least be much s…