BlazorGuidelines
BlazorGuidelines copied to clipboard
A set of coding guidelines for Microsoft Blazor projects, design principles and layout rules for improving the overall quality of your code development.
When creating a component, take the reflex to implement immediately ILogger ``` [Inject] private ILogger Logger { get; set; } ```
To improve the reading of Razor pages, it is clearer to align with a line break the attributes of components or HTML tags ❌ : `````` ✅ ``` ```
It seems cleaner to place our dependencies in a separate file so as not to overload the Statup.cs file. Like this : ``` public void ConfigureServices(IServiceCollection services) { // ......
Proposal : - Each "page" in a sub-folder, without suffix - All Blazor components that contain "@page" should be suffixed with Page - The components available for the whole application...