Blazor RenderFragment
ฝัง
- เผยแพร่เมื่อ 20 ก.ย. 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: github.com/Jas...
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
Any other aspects of Blazor you'd like me to make a video on? Leave a comment.
Source code available at: github.com/JasperKent/Blazor-Render-Fragments
Remember to subscribe at th-cam.com/channels/qWQzlUDdllnLmtgfSgYTCA.html
And if you liked the video, click the 👍.
Thank you very much!. It's amazing how much the understanding of one component can improve your experience in Blazor.
Very informative with great examples. I never come across this before and I've used RenderFragments combined and seperat mode for years. Thank you for sharing.
Very glad I watched this video. I didn't know about the first method presented for using render fragments. Great stuff.
Brilliant video. Thank you.
Awesome video as usuall, Jasper. I always look forward to when you release new videos.
Very useful and informative. Thank you.
Can you make a video about Covariance and Contravariance in generics or about nullable reference types in modern c#?
Also thanks for videos!
Already done.
Co/Contravariance: th-cam.com/video/3FTvHnhmd88/w-d-xo.html
Nullable references: th-cam.com/video/VkelpHkkg4I/w-d-xo.html
@@CodingTutorialsAreGo Oh i didn't see them )) Thanks a lot!
Very helpful.
Thank you so much.
Nice tutorial thanks!
I have a question about how to combile RenderFragment with 2-Way Binding feature of Blazor?
Let's say I want to generate a dynamic page using RenderFragment and within the fragment generated
there is a TextBox component being bound to a page's string property.
The TextBox will display the string value initially and when I change the string in the TextBox then this change
will be reflected in the page string property at the same time (hence it is named 2-Way Binding).
How can I achieve this? Thank you.