@coveo/headless-react
    Preparing search index...

    Interface ExternalEngineOptions<State>

    interface ExternalEngineOptions<State extends object> {
        configuration: EngineConfiguration;
        loggerOptions?: LoggerOptions;
        middlewares?: Middleware<{}, State, Dispatch<UnknownAction>>[];
        navigatorContextProvider?: NavigatorContextProvider;
        preloadedState?: State;
    }

    Type Parameters

    • State extends object

    Hierarchy (View Summary)

    Index

    Properties

    configuration: EngineConfiguration

    The global headless engine configuration options.

    loggerOptions?: LoggerOptions

    The logger options.

    middlewares?: Middleware<{}, State, Dispatch<UnknownAction>>[]

    List of additional middlewares. A middleware is a higher-order function that composes a dispatch function to return a new dispatch function. It is useful for logging actions, performing side effects like routing, or turning an asynchronous API call into a series of synchronous actions.

    type MiddlewareAPI = { dispatch: Dispatch, getState: () => State }
    type Middleware = (api: MiddlewareAPI) => (next: Dispatch) => Dispatch

    Redux documentation on middlewares.

    navigatorContextProvider?: NavigatorContextProvider

    An optional function returning navigation context. (referer, location, UserAgent)

    preloadedState?: State

    The initial headless state. You may optionally specify it to hydrate the state from the server in universal apps, or to restore a previously serialized user session.