Rate this page:

ReadonlyWatchable

Basic reactive type for immutable structures and primitives, the same as Watchable, but with readonly values. Setting a new value is ignored without any error, with only a warn message in the console.

Methods

clear
Copy URL

Clears all observers for this watchable excluding the ones created with WatchOptions.clearable: false.

Returns

  • type:

    void

unwatch
Copy URL

Stops triggering the specified callback on the value change.

Parameters

Returns

  • type:

    void

watch
Copy URL

Subscribes to the value changes.

When the value is changed, the OnValueChangeCallback callback is triggered.

Returns UnwatchFunction, to unwatch observable value changes.

Parameters

Returns

Props

oldValue
Copy URL

Previous value of the observable property

value
Copy URL

Current value of the observable property

Rate this page: