@umbraco-cms/backoffice

    Class UmbDeepState<T>

    UmbDeepState

    • A RxJS BehaviorSubject which deepFreezes the data to ensure its not manipulated from any implementations. Additionally the Subject ensures the data is unique, not updating any Observes unless there is an actual change of the content.

    Type Parameters

    • T

    Hierarchy (View Summary, Expand)

    Index

    Constructors

    Properties

    _subject: BehaviorSubject<T>

    Accessors

    • get value(): T

      Returns T

      Observable that

      • Holds the current data of this state.
      const myState = new UmbArrayState('Hello world');
      console.log("Value is: ", myState.value);

    Methods

    • Function

      asObservable

      Returns Observable<T>

      Observable that the State casts to.

      • Creates a new Observable with this State as the source. Observe this to subscribe to its value and future changes.
      const myState = new UmbArrayState('Hello world');

      this.observe(myState, (latestStateValue) => console.log("Value is: ", latestStateValue));
    • Function

      getValue

      Returns T

      The current data of this state.

      • Provides the current data of this state.
      const myState = new UmbArrayState('Hello world');
      console.log("Value is: ", myState.value);
    MMNEPVFCICPMFPCPTTAAATR