mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-01-14 23:53:28 +01:00
30 lines
434 B
Swift
30 lines
434 B
Swift
//
|
|
// Demo
|
|
// Copyright © 2020 John Rommel Estropia, Inc. All rights reserved.
|
|
|
|
import SwiftUI
|
|
|
|
// MARK: - LazyView
|
|
|
|
struct LazyView<Content: View>: View {
|
|
|
|
// MARK: Internal
|
|
|
|
init(_ load: @escaping () -> Content) {
|
|
|
|
self.load = load
|
|
}
|
|
|
|
|
|
// MARK: View
|
|
|
|
var body: Content {
|
|
|
|
self.load()
|
|
}
|
|
|
|
// MARK: Private
|
|
|
|
private let load: () -> Content
|
|
}
|