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

    Interface ContextActionCreators

    The context action creators.

    interface ContextActionCreators {
        addContext(
            payload: AddContextActionCreatorPayload,
        ): { payload: AddContextActionCreatorPayload; type: string };
        removeContext(key: string): { payload: string; type: string };
        setContext(payload: ContextPayload): { payload: P; type: string };
    }
    Index

    Methods

    • Removes a context key-value pair.

      Parameters

      • key: string

        The key to remove from the context (e.g., "age").

      Returns { payload: string; type: string }

      A dispatchable action.

    • Sets the query context.

      Parameters

      Returns { payload: P; type: string }

      A dispatchable action.