Result Builders in Action: Simplifying HTML Generation in Swift

Поділитися
Вставка
  • Опубліковано 27 гру 2024

КОМЕНТАРІ • 13

  • @TheZazatv
    @TheZazatv Рік тому +2

    That was a nice dive in result builder Pit! Thanks for source code :)

    • @swiftandtips
      @swiftandtips  Рік тому

      You’re welcome, glad to help! ☺️

  • @Landon_Hughes
    @Landon_Hughes Рік тому +1

    dope!!
    I've heard of ResultBuilders but haven't really seen a deep-dive until today ✊
    Now I know how John Sundell's 'Publish' was made.

  • @egor_1994
    @egor_1994 Рік тому +1

    Great job done!

  • @FloWritesCode
    @FloWritesCode Рік тому +1

    Such a great video, thanks a lot for your effort!

  • @rahuljamba5846
    @rahuljamba5846 Рік тому

    You Covered Advanced Concept using SWIFTUI

  • @vikassalian-w7f
    @vikassalian-w7f Рік тому

    Awesome video

  • @IanLeon
    @IanLeon 10 місяців тому

    👏

  • @gjermundification
    @gjermundification Рік тому

    Not sure why you do `for row in Move.sample`; wouldn't some sort of `Move.sample.map{ Tr{ Td( $0.level)...} }` be more SwiftUI-like?

    • @swiftandtips
      @swiftandtips  Рік тому

      Hi Gjermund, Yeah, technically would be the same except using Move.sample.map { row in ... } instead of for row in Move.sample { ... }
      You will also add this to the HtmlBuilder to support expression arrays:
      static func buildExpression(_ expression: [HtmlTag]) -> [HtmlTag] {
      expression
      }