Field Notes
    Preparing search index...

    Interface ViewportSource<T>

    A subscribable viewport value with a referentially stable snapshot, for UI bindings.

    interface ViewportSource<T> {
        getSnapshot(): T;
        subscribe(onChange: () => void): () => void;
    }

    Type Parameters

    • T
    Index
    • Calls onChange after any change that may alter the snapshot. Returns unsubscribe.

      Parameters

      • onChange: () => void

      Returns () => void