Skip to content

Why remove IComponentContext.IsConnected? How are we supposed to determine PreRender?Β #63232

@RobinAinscough

Description

@RobinAinscough

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

In reference to this article:

When I use NavigateTo and forcePageLoad the landing page OnInitializedAsync executes twice with a PreRender ... the only way to determine was with IComponentContext.IsConnected ... that no longer exists in .NET 9 Blazor-server. A work around was to use OnAfterRenderAsync(bool firstRender) and check the firstRender. BUT this can and does cause other issues with various 3rd party components (like Telerik for example).

So what is the alternative .NET 9 Blazor-Server since this was removed?

Describe the solution you'd like

No work-around available

Additional context

Why was this removed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Attention πŸ‘‹This issue needs the attention of a contributor, typically because the OP has provided an update.area-blazorIncludes: Blazor, Razor Components

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions