Юниверс DG SDK UI
v2.15.0

Класс Reaction

A derivation is everything that can be derived from the state (all the atoms) in a pure manner. See https://medium.com/@mweststrate/becoming-fully-reactive-an-in-depth-explanation-of-mobservable-55995262a254#.xvbh6qd74

Реализует

Индекс

Конструкторы

  • Параметры

    • name: string
    • onInvalidate: () => void
    • OptionalerrorHandler: (error: any, derivation: IDerivation) => void
    • OptionalrequiresObservable: boolean

    Возвращает Reaction

Свойства

__mapid: string
_isRunning: boolean
_isScheduled: boolean
_isTrackPending: boolean
dependenciesState: IDerivationState
diffValue: number
isDisposed: boolean
isTracing: TraceMode
name: string
newObserving: IObservable[]
observing: IObservable[]
requiresObservable: boolean

warn if the derivation has no dependencies after creation/update

runId: number

Id of the current run of a derivation. Each time the derivation is tracked this number is increased by one. This number is globally unique

unboundDepsCount: number

amount of dependencies used by the derivation in this run, which has not been bound yet.

Методы

  • Возвращает boolean

  • Параметры

    • error: any

    Возвращает void

  • internal, use schedule() if you intend to kick off a reaction

    Возвращает void

  • Возвращает void

  • Returns a string representation of an object.

    Возвращает string

  • Параметры

    • OptionalenterBreakPoint: boolean

    Возвращает void

  • Параметры

    • fn: () => void

    Возвращает void