yattee/Shared/Views/LazyView.swift

15 lines
243 B
Swift
Raw Permalink Normal View History

2021-09-13 20:41:16 +00:00
import Foundation
import SwiftUI
struct LazyView<Content: View>: View {
let build: () -> Content
2021-09-13 20:41:16 +00:00
init(_ build: @autoclosure @escaping () -> Content) {
self.build = build
}
var body: Content {
build()
}
}