Skip to content

[Blazor] Register persistent component state on Blazor WebviewΒ #62383

@javiercn

Description

@javiercn

The fix is to register the PersistentComponentState related services on public static IServiceCollection AddBlazorWebView(this IServiceCollection services)

services.TryAddScoped<PersistentComponentStateManager>();
services.TryAddScoped<PersistentComponentState>(sp => sp.GetRequiredService<ComponentStatePersistenceManager>().State);

Metadata

Metadata

Assignees

Labels

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