Aspnetcore: Blazor docs: Requires more information for lifetimes

Created on 1 Jan 2020  路  6Comments  路  Source: dotnet/aspnetcore

https://docs.microsoft.com/en-us/aspnet/core/blazor/dependency-injection?view=aspnetcore-3.1

This page says that IJSInterop etc are scoped as singletons, which is incorrect in server-side apps.

Docs area-blazor

Most helpful comment

Thanks for the issue report @mrpmorris. We'll work on updating the docs as part of the Blazor WASM release.

All 6 comments

Thanks for the issue report @mrpmorris. We'll work on updating the docs as part of the Blazor WASM release.

@guardrex can you handle this?

Where are you seeing that @mrpmorris? The topic states (for IJSRuntime) ...

Singleton (Blazor WebAssembly)
Scoped (Blazor Server)

... and doesn't refer to IJSInterop or JS interop otherwise.

I see now that with HttpClient, we have a Transient registration for WASM. I'll fix that one.

btw - Please open docs issues on the docs repo by using the This page feedback button+form.

@guardrex You fixed it 1 week after I reported it, but the PR doesn't reference this issue so it has remained open.

https://github.com/dotnet/AspNetCore.Docs/pull/16463

:smile: @mrpmorris ... sorry about that. I'm 馃弮馃槗馃樀 with updates these days. It worked out ok tho because I spotted that HttpClient entry that needed a fix, and that's taken care of now. :+1:

Was this page helpful?
0 / 5 - 0 ratings