TinyBase logoTinyBase β

useLocalRowIds

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

useLocalRowIds(
  relationshipId: MaybeGetter<string>,
  remoteRowId: MaybeGetter<string>,
  relationshipsOrRelationshipsId?: MaybeGetter<undefined | RelationshipsOrRelationshipsId>,
): {current: Ids}
TypeDescription
relationshipIdMaybeGetter<string>

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

remoteRowIdMaybeGetter<string>

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

relationshipsOrRelationshipsId?MaybeGetter<undefined | RelationshipsOrRelationshipsId>

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

returns{current: Ids}

A reactive object with a current Ids property.

Since

v8.1.0