TinyBase logoTinyBase β

useRemoteRowIdListener

The useRemoteRowIdListener hook registers a listener that is called whenever the remote Row Id for a local Row changes.

useRemoteRowIdListener(
  relationshipId: MaybeGetter<IdOrNull>,
  localRowId: MaybeGetter<IdOrNull>,
  listener: RemoteRowIdListener,
  relationshipsOrRelationshipsId?: MaybeGetter<undefined | RelationshipsOrRelationshipsId>,
): void
TypeDescription
relationshipIdMaybeGetter<IdOrNull>

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

localRowIdMaybeGetter<IdOrNull>

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

listenerRemoteRowIdListener

The function to call when the remote Row Id changes.

relationshipsOrRelationshipsId?MaybeGetter<undefined | RelationshipsOrRelationshipsId>

The Relationships object to use, or its Id.

returnsvoid

This has no return value.

Since

v8.1.0