Skip to content

Conversation

@guardrex
Copy link
Contributor

@guardrex guardrex commented Nov 20, 2025

Addresses dotnet/AspNetCore.Docs#36370

Ilona ...

  • Please check the naming of the sample folders to see if they make sense. I'm aligning the two samples with similar naming: DotNetOnWebWorkersBlazorWebAssembly and DotNetOnWebWorkersReact.
  • I updated the sample to 10.0 and added the Not Found features.
  • I used a placeholder with the text <input> element so that one doesn't need to back out the text to type something in the field.
  • Static analysis said to add await to InvokeAsync(StateHasChanged) in Home.razor.cs (I think because the method returns a Task).
  • Other tiny nits here and there on spacing in the code for consistency with what we normally do.

I'll go work on the article next. I'll update the React sample name in the .NET on Web Workers article on the docs PR.

@guardrex guardrex requested a review from Copilot November 20, 2025 14:21
Copilot finished reviewing on behalf of guardrex November 20, 2025 14:23
@guardrex guardrex requested a review from ilonatommy November 20, 2025 14:24
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a comprehensive Blazor WebAssembly sample demonstrating .NET on Web Workers and updates the existing React sample with consistent naming. The samples show how to run .NET code on web workers to offload computation from the main UI thread, using QR code generation as a practical example.

Key Changes

  • Adds DotNetOnWebWorkersBlazorWebAssembly sample with complete Blazor WASM implementation including worker infrastructure, UI components, and build scripts
  • Renames React sample to DotNetOnWebWorkersReact for consistent naming across samples
  • Updates both samples to target .NET 10.0 with appropriate package versions

Reviewed Changes

Copilot reviewed 28 out of 52 changed files in this pull request and generated no comments.

Show a summary per file
File Description
run.sh Shell script for building and running the Blazor WASM project on Unix systems
run.cmd Batch script for building and running the Blazor WASM project on Windows
README.md (Blazor) Documentation for the Blazor sample with startup instructions
BlazorWasm/ Complete Blazor WebAssembly project with components, layouts, pages, and styles
Workers/QRGenerator.razor.* Web worker implementation for QR code generation using .NET
Clients/Client.razor.* JavaScript interop client for communicating with workers
Components/Popup.razor Reusable popup component for displaying errors
Pages/Home.razor Main page with QR code generation UI
App.razor Root application component with routing and NotFound page configuration
BlazorWasm.csproj Project file targeting net10.0 with required packages
DotNetOnWebWorkersReact/ Updated React sample with consistent naming and structure
dotnet/Program.cs QR generator implementation for the React sample
react/src/* React UI components and worker client code

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@ilonatommy ilonatommy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After that small rename, it's working and looks good. Thanks!

@guardrex guardrex merged commit a7f9806 into main Nov 21, 2025
1 check passed
@guardrex guardrex deleted the guardrex/add-sample branch November 21, 2025 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants