Function useChange

  • A hook that tracks the CHANGE event in a Jacdac component and reruns, caches the query. The query is not part of the dependency checking.

    Returns

    Type Parameters

    • TEventSource extends IEventSource

    • TValue

    Parameters

    • node: TEventSource

      JDOM element

    • Optional query: ((n: TEventSource) => TValue)

      query run whenever a change is signaled by the component

        • (n: TEventSource): TValue
        • Parameters

          • n: TEventSource

          Returns TValue

    • Optional deps: DependencyList

      optional list of hooks dependencies

    • Optional isEqual: ((a: TValue, b: TValue) => boolean)
        • (a: TValue, b: TValue): boolean
        • Parameters

          • a: TValue
          • b: TValue

          Returns boolean

    Returns TValue

Generated using TypeDoc