Interface DOMStateSync

A DOM state sync function that can be used as an imperative update method from within a DOM state sync callback, but also as a decorator factory.

see

syncDOMState

Type parameters

Type parameter Description
TElement: HTMLElement

the kind of HTML element that can be synced.

TState

the shape of the DOM state that is needed to sync.

Callable

  • __call(el: TElement | Falsy, state: TState | void): void
  • This overloads imperatively updates the DOM element state based on the supplied state information.

    Parameters

    • el: TElement | Falsy
    • state: TState | void

    Returns void

  • __call<TComponent>(syncProps: function): function
  • This overload creates a React component class decorator that syncs the specified element's state.

    Type parameter Description
    TComponent: Component

    Parameters

    • syncProps: function
        • (component: TComponent): object | Falsy
        • Parameters

          • component: TComponent

          Returns object | Falsy

    Returns function

      • (component: object): void
      • Parameters

        • component: object

        Returns void

Generated using TypeDoc