Update Blazor EventCallback example (#18802)
parent
2d32ec6eb2
commit
6f8db9a59b
|
@ -173,7 +173,7 @@ When the button is selected in the `ChildComponent`:
|
|||
Invoke an <xref:Microsoft.AspNetCore.Components.EventCallback> or <xref:Microsoft.AspNetCore.Components.EventCallback%601> with <xref:Microsoft.AspNetCore.Components.EventCallback.InvokeAsync%2A> and await the <xref:System.Threading.Tasks.Task>:
|
||||
|
||||
```csharp
|
||||
await callback.InvokeAsync(arg);
|
||||
await OnClickCallback.InvokeAsync(arg);
|
||||
```
|
||||
|
||||
Use <xref:Microsoft.AspNetCore.Components.EventCallback> and <xref:Microsoft.AspNetCore.Components.EventCallback%601> for event handling and binding component parameters.
|
||||
|
|
Loading…
Reference in New Issue