TinyBase logoTinyBase β

useRelationshipsOrRelationshipsById

The useRelationshipsOrRelationshipsById hook is used to get a reference to a Relationships object from a Provider context, or have it passed directly.

useRelationshipsOrRelationshipsById(relationshipsOrRelationshipsId?: MaybeGetter<undefined | RelationshipsOrRelationshipsId>): () => Relationships | undefined
TypeDescription
relationshipsOrRelationshipsId?MaybeGetter<undefined | RelationshipsOrRelationshipsId>

The Relationships object, its Id, or a getter returning either.

returns() => Relationships | undefined

A getter function returning the Relationships object, or undefined.

Since

v8.1.0