TinyBase logoTinyBase β

useRemoteRowId

The useRemoteRowId hook returns a reactive object reflecting the remote Row Id for a given local Row in a Relationship, and registers a listener so that any changes will update .current.

useRemoteRowId(
  relationshipId: MaybeGetter<string>,
  localRowId: MaybeGetter<string>,
  relationshipsOrRelationshipsId?: MaybeGetter<undefined | RelationshipsOrRelationshipsId>,
): {current: Id | undefined}
TypeDescription
relationshipIdMaybeGetter<string>

The Id of the Relationship (or a getter returning it).

localRowIdMaybeGetter<string>

The Id of the local Row (or a getter returning it).

relationshipsOrRelationshipsId?MaybeGetter<undefined | RelationshipsOrRelationshipsId>

The Relationships object to use (plain or getter), or its Id.

returns{current: Id | undefined}

A reactive object with a current Id | undefined property.

Since

v8.1.0