Created
August 29, 2018 17:46
-
-
Save EdCharbeneau/28d0a02a716dffced9730836d7e4cb2d to your computer and use it in GitHub Desktop.
Working with the Blazor JavaScript Interop 5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div onclick="@HandleClick" class="my-component"> | |
@Message | |
</div> | |
@functions { | |
string Message = "Click to change"; | |
async void HandleClick() | |
{ | |
Message = await PromptInterop.PromptAsync("Type a message"); | |
StateHasChanged(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment