reducer action

A plain object describing something that happened, usually with a type string and optional payload data, sent to a reducer through dispatch.

In more detail

By convention the type names the event, such as FETCH_SUCCESS, and the payload carries its data. Describing what happened rather than what to set keeps the update rules inside the reducer.

Example

{ type: "FETCH_SUCCESS", payload: "data" }

Related terms

Taught in

References