Open Alerinos opened 2 years ago
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.
@Alerinos I think this might be a dupe of https://github.com/dotnet/aspnetcore/issues/49401. Does that seem right to you?
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.
Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
Blazor could use the function of detecting the first loading of a component / subpage by the server.
If we use
OnInitializedAsync
it will work like this:If we have a subpage where the code takes longer to load (e.g. we wait for the API), a problem arises. The first load is delayed by this component.
In case we don't want to be indexed by bots, there should be a function like don't do it on server side. We can do a Skeleton and wait for the task to be done.
It is possible to do this by
PersistentComponentState
, but it is not convenient and there are problems with many components (you can call it only once)I propose to do something like this:
or
I also know about the existence of
OnAfterRenderAsync
but it doesn't render the code on the server side.Describe the solution you'd like
Let me know what you think, I think letting the developer decide whether the code is to be rendered server-side or not is a good solution. This will prevent the problem of delaying the entire page by, for example, one component.
Additional context
No response