@coveo/headless
    Preparing search index...

    Interface Context

    The Context controller exposes methods for managing the global context in a commerce interface.

    interface Context {
        state: ContextState;
        setCountry(country: string): void;
        setCurrency(currency: CurrencyCodeISO4217): void;
        setLanguage(language: string): void;
        setLocation(location: UserLocation): void;
        setView(view: View): void;
        subscribe(listener: () => void): Unsubscribe;
    }

    Hierarchy (View Summary)

    Index

    Methods

    Properties

    A scoped and simplified part of the headless state that is relevant to the Context controller.