EmitResult
interfaceWhat an emit resolves to once its effects have run.
emit used to resolve to void, so a caller could not tell "the reducer applied my write"
from "the reducer looked at my write and returned the state unchanged". On a single-writer
store that distinction is academic; on a contended one it is a lost update the API could not
report.
Deliberately does **not** carry the changed paths. Building that list costs a string
concatenation per changed path on every emit, and almost no caller reads it, the same reason
change notifications are built lazily. Instrumentation already provides them to the observers
that do want them.Properties
| Name | Type | Description |
|---|---|---|
committed | boolean | The event was not vetoed by middleware. |
reason? | NotCommittedReason | Why the event did not commit. Absent when it did. |
rejected? | Rejection | Present when a reducer refused the write. See Rejection. |
vetoedBy? | string | The name of the middleware that vetoed, when it declared one through meta.name. |
written | boolean | A reducer actually changed state. |