docs/Structs/Reactive.html
@dynamicMemberLookup
public struct Reactive<Base>
Use Reactive proxy as customization point for constrained protocol extensions.
General pattern would be:
// 1. Extend Reactive protocol with constrain on Base // Read as: Reactive Extension where Base is a SomeType extension Reactive where Base: SomeType { // 2. Put any specific reactive extension for SomeType here }
With this approach we can have more specialized methods and properties using Base and not just specialized on common base type.
Binders are also automatically synthesized using @dynamicMemberLookup for writable reference properties of the reactive base.
`
base
`
Base object to extend.
Swift
public let base: Base
`
init(_:)
`
Creates extensions with base object.
Swift
public init(_ base: Base)
| base |
Base object.
|
`
subscript(dynamicMember:)
`
Automatically synthesized binder for a key path between the reactive base and one of its properties
Swift
public subscript<Property>(dynamicMember keyPath: ReferenceWritableKeyPath<Base, Property>) -> Binder<Property> where Base : AnyObject { get }