Skip to content

Commit e16ca0b

Browse files
authored
Remark on async delegate event handler examples (#34549)
1 parent 3053975 commit e16ca0b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

aspnetcore/blazor/components/event-handling.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ For event handling:
2626
:::moniker range=">= aspnetcore-8.0"
2727

2828
* Delegate event handlers in Blazor Web Apps are only called in components that adopt an interactive render mode. The examples throughout this article assume that the app adopts an interactive render mode globally in the app's root component, typically the `App` component. For more information, see <xref:blazor/components/render-modes#apply-a-render-mode-to-the-entire-app>.
29-
* Asynchronous delegate event handlers that return a <xref:System.Threading.Tasks.Task> are supported.
29+
* Asynchronous delegate event handlers that return a <xref:System.Threading.Tasks.Task> (`async Task`) are supported by Blazor and adopted by Blazor Web App and Blazor WebAssembly documentation examples.
3030
* Delegate event handlers automatically trigger a UI render, so there's no need to manually call [`StateHasChanged`](xref:blazor/components/lifecycle#state-changes-statehaschanged).
3131
* Exceptions are logged.
3232

3333
:::moniker-end
3434

3535
:::moniker range="< aspnetcore-8.0"
3636

37-
* Asynchronous delegate event handlers that return a <xref:System.Threading.Tasks.Task> are supported.
37+
* Asynchronous delegate event handlers that return a <xref:System.Threading.Tasks.Task> (`async Task`) are supported by Blazor and adopted by Blazor Server and Blazor WebAssembly documentation examples.
3838
* Delegate event handlers automatically trigger a UI render, so there's no need to manually call [`StateHasChanged`](xref:blazor/components/lifecycle#state-changes-statehaschanged).
3939
* Exceptions are logged.
4040

aspnetcore/blazor/includes/js-interop/js-collocation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ The following `JsCollocation2` component's `OnAfterRenderAsync` method loads a J
116116
}
117117
}
118118
119-
public async void ShowPrompt()
119+
public async Task ShowPrompt()
120120
{
121121
if (module is not null)
122122
{

0 commit comments

Comments
 (0)