private void LoadBooks(int page) { Action <string> action = async(token) => { BooksClient.Token = token; Books = await BooksClient.ListBooks(page, 10); StateHasChanged(); }; ((MonoWebAssemblyJSRuntime)JSRuntime).InvokeUnmarshalled <Action <string>, bool>("blazorDemoInterop.executeWithToken", action); }
private async Task LoadBooks(int page) { Action <string> action = async(token) => { BooksClient.Token = token; Books = await BooksClient.ListBooks(page); StateHasChanged(); }; await JSRuntime.Current.InvokeAsync <bool>("blazorDemoInterop.executeWithToken", action); }
private async Task LoadBooks(int page) { Books = await BooksClient.ListBooks(page); }