support for stored properties

struct CardView<Content: View>: View {

  // ๐Ÿ‘‡๐Ÿป New in Swift 5.4
  @ViewBuilder let content: Content
  
  // โญ๏ธ Swift will synthesize the following (internal) initializer:
  // ```
  // internal init(@ViewBuilder content: () -> Content) {
  //   self.content = content()
  // }
  // ```

  var body: some View {
    content
  }
}

Last updated