Interface RecordSignalConfig<K, V>

the configuration options used by most record signal constructors.

interface RecordSignalConfig<K, V> {
    name?: string;
    equals?: EqualityCheck<V>;
    defer?: boolean;
}

Type Parameters

  • K extends PropertyKey
  • V

Hierarchy (view full)

Properties

Properties

name?: string

give a name to the signal for debugging purposes

equals?: EqualityCheck<V>

when a signal's value is updated (either through a PureSetter, or a change in the value of a dependency signal in the case of a memo), then the dependants/observers of THIS signal will only be notified if the equality check function evaluates to a false.
see EqualityCheck to see its function signature and default behavior when left undefined

defer?: boolean

when false, the computaion/effect function will be be evaluated/run immediately after it is declared.
however, if left undefined, or true, the function's execution will be put off until the reactive signal returned by the createXYZ is called/accessed.
by default, defer is true, and reactivity is not immediately executed during initialization.
the reason why you might want to defer a reactive function is because the body of the reactive function may contain symbols/variables that have not been defined yet, in which case an error will be raised, unless you choose to defer the first execution.

Generated using TypeDoc