Is there some kind of Computed Observable in ReactiveKit Or Bond?
Does initializing an Observable with a native Swift computed property will act the same?
Is there some kind of Computed Observable in ReactiveKit Or Bond?
Does initializing an Observable with a native Swift computed property will act the same?
I have implemented it like this:
class Person {
var firstName: String
var lastName: String
private var fullNameBG: Observable<String>
var fullName: Observable<String> {
computedPropBG.next("\(firstName) \(lastName)")
return computedPropBG
}
init() {
fullNameBG = Observable("")
}
}
Will be glad to hear a better solution.