gerich-home/it-depends

View on GitHub
docs/observableValue/onChange.md

Summary

Maintainability
Test Coverage
### `observableValue.onChange(callback)`
Creates the subscription on a change to this observable value.

#### Parameters:
* `callback` *(mandatory, `function (changed: [observableValue<T>](../observableValue.md), from: any, to: any) -> void`)* - the function that will be called immediately when a change is made to this observable value. The callback receives the changed observableValue, old and new value of observable object.

#### Returns:
Type: [`subscription`](../subscription.md).
The subscription object that can be used to control the subscription.

#### See also:
* [`itDepends`](../itDepends.md)
* [`observableValue`](../observableValue.md)
* [`computedValue`](../computedValue.md)
* [`computedForArgs`](../computedForArgs.md)
* [`subscription`](../subscription.md)