Utility
-
BJNObservableis a generic type that generates a callback when its value is changed. It can be used to listen in on changes to a specific value, but not to update the value itself.BJNObservableis read-only, for write capabilities, seeBJNMutableObservableMonitor any change to the value as:
See moreclientMuteState.onChange { print("the client is now \(clientMuteState.value ? "muted" : "unmuted")") } -
BJNMutableObservableis aBJNObservablethat allows its value to be changed.To modify a
BJNMutableObservable‘s value,mutableObservableVar.value = trueAs a subclass of
BJNObservable, you can still listen in on value changes.
See moremutableObservableVar.onChange { print("value changed to ", mutableObservableVar.value) } -
-