Interface JimpexReducerEventPayloads

A dictionary of the payloads the reducer events the application uses.

interface JimpexReducerEventPayloads {
    controllerWillBeMounted: EventPayload<{
        controller: Resource<"controller", "connect", ControllerConnectFn> | Resource<"middleware", "connect", MiddlewareConnectFn>;
        route: string;
    }>;
    middlewareWillBeUsed: EventPayload<Record<string, unknown>>;
}

Properties

controllerWillBeMounted: EventPayload<{
    controller: Resource<"controller", "connect", ControllerConnectFn> | Resource<"middleware", "connect", MiddlewareConnectFn>;
    route: string;
}>

It gets called before mounting a router/middleware for a specific route.

Type declaration

  • controller: Resource<"controller", "connect", ControllerConnectFn> | Resource<"middleware", "connect", MiddlewareConnectFn>

    A reference for the controller/middleware before being "connected".

  • route: string

    The route in which the controller will be mounted.

middlewareWillBeUsed: EventPayload<Record<string, unknown>>

It gets called before using a middleware without route.