TinyBase logoTinyBase β

useLocalRowIdsListener

The useLocalRowIdsListener hook registers a listener that is called whenever the local Row Ids for a remote Row change.

useLocalRowIdsListener(
  relationshipId: MaybeGetter<IdOrNull>,
  remoteRowId: MaybeGetter<IdOrNull>,
  listener: LocalRowIdsListener,
  relationshipsOrRelationshipsId?: MaybeGetter<undefined | RelationshipsOrRelationshipsId>,
): void
TypeDescription
relationshipIdMaybeGetter<IdOrNull>

The Id of the Relationship, or null to listen to any Relationship.

remoteRowIdMaybeGetter<IdOrNull>

The Id of the remote Row, or null to listen to any remote Row.

listenerLocalRowIdsListener

The function to call when local Row Ids change.

relationshipsOrRelationshipsId?MaybeGetter<undefined | RelationshipsOrRelationshipsId>

The Relationships object to use, or its Id.

returnsvoid

This has no return value.

Since

v8.1.0