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

ความคิดเห็น • 15

  • @CodingTutorialsAreGo
    @CodingTutorialsAreGo  5 หลายเดือนก่อน +1

    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 👍.

    • @robinheyer708
      @robinheyer708 5 หลายเดือนก่อน

      Thank you very much!. It's amazing how much the understanding of one component can improve your experience in Blazor.

  • @CRBarchager
    @CRBarchager 5 หลายเดือนก่อน +1

    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.

  • @liquidpebbles
    @liquidpebbles 5 หลายเดือนก่อน +1

    Very glad I watched this video. I didn't know about the first method presented for using render fragments. Great stuff.

  • @mattbristo6933
    @mattbristo6933 หลายเดือนก่อน +1

    Brilliant video. Thank you.

  • @Sorlandskode
    @Sorlandskode 5 หลายเดือนก่อน +1

    Awesome video as usuall, Jasper. I always look forward to when you release new videos.

  • @AmerBakeer
    @AmerBakeer 5 หลายเดือนก่อน +1

    Very useful and informative. Thank you.

  • @4rmboy
    @4rmboy 5 หลายเดือนก่อน +2

    Can you make a video about Covariance and Contravariance in generics or about nullable reference types in modern c#?
    Also thanks for videos!

    • @CodingTutorialsAreGo
      @CodingTutorialsAreGo  5 หลายเดือนก่อน +2

      Already done.
      Co/Contravariance: th-cam.com/video/3FTvHnhmd88/w-d-xo.html
      Nullable references: th-cam.com/video/VkelpHkkg4I/w-d-xo.html

    • @4rmboy
      @4rmboy 5 หลายเดือนก่อน +1

      @@CodingTutorialsAreGo Oh i didn't see them )) Thanks a lot!

  • @talkathiriify
    @talkathiriify 5 หลายเดือนก่อน +1

    Very helpful.
    Thank you so much.

  • @10Totti
    @10Totti 5 หลายเดือนก่อน +2

    Nice tutorial thanks!

  • @pirnadi
    @pirnadi 2 หลายเดือนก่อน

    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.