The Summary sub-controller manages a summary of the current search results.

interface Summary<State extends SummaryState = SummaryState> {
    state: State;
    subscribe(listener: () => void): Unsubscribe;
}

Type Parameters

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.

Properties

state: State

A scoped and simplified part of the headless state that is relevant to the SearchSummary sub-controller.