Published On Mar 29, 2024
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-...
Related video: C#11 String Things • C# 11 - String Things
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
show more