Project rules
.NET Blazor Rules
Project rules for Blazor apps: small components, scoped state, injected services, EditForm validation and bUnit component tests.
CLAUDE.md
1Components
2- One component per `.razor` file with a code-behind `.razor.cs` partial class once logic passes a few lines. Keep markup free of business rules.
3- Use `[Parameter]` for inputs and `EventCallback<T>` for outputs. Mark required inputs with `[EditorRequired]`. Never mutate a parameter from inside the child.
4- Override `OnInitializedAsync` for loading; call `StateHasChanged` only after work done outside the render cycle.
5Services and state
csharpdotnet
#
.NET Blazor Rules
Project rulescsharp
Free