F
onChange
Registers a callback invoked on every settings change matching the predicate.
function onChange(predicate: SettingsPredicate, callback: (payload: SettingsPayload) => void): () => voidParameters
| Name | Type | Description |
|---|---|---|
| predicate | SettingsPredicate | Decides whether a given change should fire the callback. The payload names the Bucket in |
| callback | (payload: SettingsPayload) => void | Invoked with the payload of each matching change. |
Returns
() => voidA function that removes the listener.