StoreListener

See source code

A function that will be called when the history changes.

type StoreListener<R extends UnknownRecord> = (entry: HistoryEntry<R>) => void

Example

const listener: StoreListener<Book> = (entry) => {
  console.log('Changes:', entry.changes)
  console.log('Source:', entry.source)
}

store.listen(listener)

Parameters

NameDescription

entry

The history entry containing the changes

Prev
StoreBeforeDeleteHandler
Next
StoreObject