Class MutableReactiveValue<T>Abstract

A ReactiveValue is a value that

  • updates periodically,
  • can fire listeners when it updates,
  • and can be chanined together with other ReactiveValues.

A ReactiveValue is a read-only view. See MutableReactiveValue for a read-write view.

Static methods in the ReactiveValue and MutableReactiveValue classes are constructors (e.g. fromImmutable).

Avoid extending this class from an external library, as that may not be stable.

Type Parameters

  • T

Hierarchy (View Summary)

Constructors

Methods

  • Returns a reference to the current value of this ReactiveValue.

    The result of this should not be modified (use setValue instead).

    Returns T

  • Registers a listener that is notified when the value of this changes.

    Parameters

    • listener: UpdateCallback<T>

    Returns ListenerResult

  • Changes the value of this and, if different, fires all update listeners.

    Parameters

    • newValue: T

    Returns void

OpenSource licenses