Add Blazor WASM .NET on Web Workers sample app#635
Merged
Conversation
There was a problem hiding this comment.
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
DotNetOnWebWorkersBlazorWebAssemblysample with complete Blazor WASM implementation including worker infrastructure, UI components, and build scripts - Renames React sample to
DotNetOnWebWorkersReactfor 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.
ilonatommy
approved these changes
Nov 21, 2025
Member
ilonatommy
left a comment
There was a problem hiding this comment.
After that small rename, it's working and looks good. Thanks!
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses dotnet/AspNetCore.Docs#36370
Ilona ...
DotNetOnWebWorkersBlazorWebAssemblyandDotNetOnWebWorkersReact.<input>element so that one doesn't need to back out the text to type something in the field.awaittoInvokeAsync(StateHasChanged)inHome.razor.cs(I think because the method returns aTask).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.