Skip to content

Instantly share code, notes, and snippets.

@EdCharbeneau
Created August 29, 2018 17:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EdCharbeneau/28d0a02a716dffced9730836d7e4cb2d to your computer and use it in GitHub Desktop.
Save EdCharbeneau/28d0a02a716dffced9730836d7e4cb2d to your computer and use it in GitHub Desktop.
Working with the Blazor JavaScript Interop 5
<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