Blazor, during the first visit, the page loads twice
Alerinos opened this issue · comments
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
The problem occurs on the Blazor Server Side. If we enter the website, it loads statically for the first time, everything is fine. Then the next loading is dynamic.
Video: (Test network Fast 3G)
https://www.awesomescreenshot.com/video/9628814?key=df3856b7747e341d4c44c561c7887af2
https://gyazo.com/42990466ec4368bb980f71a65c40c981
Then the sida server immediately loads
I noticed that in this case there are even 3 page loads ...
This problem occurs everywhere, even in the clean design created by vs.
URL page:
https://instytutkrypto.pl/
What could it be? How to prevent this from happening? I once saw a tutorial on this but only for wasm.
Expected Behavior
The page should load once, not jump.
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
.net core 7 preview 5
Anything else?
No response
Once during prerendering, once after. This is by design.
If I set the method not asynchronous, my code will not execute.
@javiercn
I gave a thumbs up. In my opinion, the .net 7 version should be catching up, not creating minimal interfaces and things that are not must-have.
Do you have any idea / method to fix this problem quickly? Unfortunately, I can't call a non-async method.