1 import UIKit 2 3 /** 4 A definition of the view factory that creates views. 5 */ 6 internal struct ViewFactory: ViewManagerDefinitionComponent { 7 typealias FactoryClosureType = () -> UIView 8 9 let factory: FactoryClosureType 10 11 init(_ factory: @escaping FactoryClosureType) { 12 self.factory = factory 13 } 14 createnull15 func create() -> UIView { 16 return factory() 17 } 18 } 19