Interface Action<P>

An object passed to dispatch then sequentially to each ActionHandler.

interface Action<P> {
    id: string | number;
    payload?: P;
}

Type Parameters

  • P = unknown

    The type of the payload property.

Properties

Properties

id: string | number

Identifies the action. Handlers use this to determine if they should operate on the action.

payload?: P

Data needed by handlers to process the action.