Skip to content

PrerenderStateService #5206

Answered by ysmoradi
rh1376 asked this question in Q&A
Discussion options

You must be logged in to vote

Consider a common scenario where a page uses an HTTP client to get data from the server in its OnInitialized method. While the data is being received, a loading indicator is displayed.

If this page is pre-rendered, it will be displayed to the user on the client side with all of the data. Then, Blazor will start working and the OnInitialized method will be called again to get the data from the server. This takes some time, so a loading indicator is displayed again.

The user sees the following:

1- A page with complete information
2- A loading indicator
3- A page with complete information

This happens very quickly, but it can be jarring for the user because the page appears to blink.

This is…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by ysmoradi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants