-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
DoneThis issue has been fixedThis issue has been fixedarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor ComponentsbugThis issue describes a behavior which is not expected - a bug.This issue describes a behavior which is not expected - a bug.feature-blazor-lazy-loadingIssues related to adding support for lazy-loading in BlazorIssues related to adding support for lazy-loading in Blazorfeature-blazor-wasmThis issue is related to and / or impacts Blazor WebAssemblyThis issue is related to and / or impacts Blazor WebAssembly
Milestone
Description
This would be desirable because then developers can understand OnNavigateAsync
as being equivalent to any other event handler, in that:
- It causes the host page to re-render both synchronously and asynchronously
- Any cancelled tasks will be discarded
If we don't do it, and keep it as Func<NavigationContext, Task>
, then the host page won't re-render in response to navigation (only the Router
and its descendants will). This is a bit of an obscure edge case, but would be surprising and would be hard to fix without a breaking change in the future.
Just for the sake of preserving where we got to, here's a quick sketch of how EventCallback could be used for this.
Metadata
Metadata
Assignees
Labels
DoneThis issue has been fixedThis issue has been fixedarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor ComponentsbugThis issue describes a behavior which is not expected - a bug.This issue describes a behavior which is not expected - a bug.feature-blazor-lazy-loadingIssues related to adding support for lazy-loading in BlazorIssues related to adding support for lazy-loading in Blazorfeature-blazor-wasmThis issue is related to and / or impacts Blazor WebAssemblyThis issue is related to and / or impacts Blazor WebAssembly