WillApplyChangesCallback
The WillApplyChangesCallback type describes a function that is called before Changes are applied to the Store.
(changes: Changes): Changes | undefined| Type | Description | |
|---|---|---|
changes | Changes | The |
| returns | Changes | undefined | The |
The callback receives the Changes object that is about to be applied. It can return the Changes (possibly transformed) to allow the write, or undefined to prevent the Changes from being applied.
Multiple WillApplyChangesCallback functions can be registered and they will be called sequentially, the Changes being updated successively. If any callback returns undefined, the chain short-circuits and the Changes will not be applied.
Since
v8.0.0