TinyBase logoTinyBase

GetIdChanges

The GetIdChanges type describes a function that returns information about the changes to a set of Ids during a transaction.

(): {[id: Id]: 1 | -1}
returns{[id: Id]: 1 | -1}

An object keyed by Id with a numerical value. 1 means the Id was added, and 1 means it was removed.

A GetIdChanges function is provided to every listener when called due Ids in the Store changing. It returns an object where each key is an Id that changed. The listener can then easily identify which Ids have been added (those with the value 1), and which have been removed (those with the value -1).

Since

v3.3.0