Reactive APIs
    Preparing search index...

    Interface ReactiveOptions<T>

    Options that can be passed when creating a new signal.

    interface ReactiveOptions<T> {
        equal?: EqualsFunc<T>;
        unwatched?: () => void;
        watched?: () => void;
    }

    Type Parameters

    • T
    Index

    Properties

    equal?: EqualsFunc<T>

    Shall return true if the two values are considered equal.

    Reactive assignments using a new value equal to the current value will be ignored. By default, Object.is is used to compare values.

    unwatched?: () => void

    This function will be invoked when the last watcher stops watching this signal.

    See also watched.

    watched?: () => void

    This function will be invoked when the first watcher starts to watch this signal.

    See also unwatched.