MENU

Fun & Interesting

Blazor RenderFragment

Coding Tutorials 3,599 1 year ago
Video Not Working? Fix It Now

Writing software is all about the DRY Principle - Don't Repeat Yourself. But how can we do that in Blazor component? Enter the RenderFragment class. Source code available at: https://github.com/JasperKent/Blazor-Render-Fragments Related video: C#11 String Things https://youtu.be/_jG_RgLYijI Topics include: - Creating Razor markup as strings - The MarkupString class - The problems of raw string literals in Razor files - Creating literal RenderFragments - The problem of literal RenderFragments in C# files - General RenderFragments with lambdas - Rendering component content in a child component - Creating generic components

Comment