You are reading the docs for 0.9. The latest version is 0.10. Read this page for 0.10 →

EffectFunction<S = any, EM extends EventMapBase = EventMapBase>

type
types.ts:1370

Effect handler: runs AFTER reducers, sees the final state.

Definition

type
type EffectFunction<S = any, EM extends EventMapBase = EventMapBase> = (event: EventUnion<EM>, getState: () => S, emit: Emit<EM>) => void | Promise<void>

(event: EventUnion<EM>, getState: () => S, emit: Emit<EM>) => void | Promise<void>

Type parameters

NameTypeDescription
S–Store state (readonly).
EMextends EventMapBaseEvent map.