interface ProductView {
    state: {};
    subscribe(listener: () => void): Unsubscribe;
    view(product: Product): void;
}

Hierarchy (View Summary)

Methods

Properties

Methods

  • Adds a callback that's invoked on state change.

    Parameters

    • listener: () => void

      A callback that's invoked on state change.

    Returns Unsubscribe

    A function to remove the listener.

  • Trigger a view event for the product.

    Parameters

    • product: Product

      The product view event payload.

    Returns void

Properties

state: {}