TinyBase logoTinyBase β

Hook functions

useIndexStoreTableId

The useIndexStoreTableId hook returns the Store and table Id for a given Indexes object and index Id. Read more.

useRelationshipsStoreTableIds

The useRelationshipsStoreTableIds hook returns the Store, local table Id, and remote table Id for a given Relationships object and relationship Id. Read more.

useStore

The useStore hook returns the default Store from the current Provider context (or a named Store if an Id is provided). Read more.

useStoreIds

The useStoreIds hook returns a reactive object with the Ids of all Stores registered in the current Provider context. Read more.

useStoreOrStoreById

The useStoreOrStoreById hook is used to get a reference to a Store object from a Provider context, or have it passed directly. Read more.

useHasTables

The useHasTables hook returns a reactive object indicating whether any Tables exist in the Store, and registers a listener so that any changes to that result will update .current. Read more.

useHasTablesListener

The useHasTablesListener hook registers a listener that is called whenever any Tables are added to or removed from the Store. The listener is tied to the component's $effect lifecycle and is removed when the component unmounts. Read more.

useTables

The useTables hook returns a reactive object reflecting the Tables in the Store, and registers a listener so that any changes to those Tables will update .current. Read more.

useTablesListener

The useTablesListener hook registers a listener that is called whenever tabular data in the Store changes. Read more.

useTableIds

The useTableIds hook returns a reactive object reflecting the Ids of the Tables in a Store, and registers a listener so that any changes to those Ids will update .current. Read more.

useTableIdsListener

The useTableIdsListener hook registers a listener that is called whenever the set of Table Ids in the Store changes. Read more.

useHasTable

The useHasTable hook returns a reactive object indicating whether a Table exists in the Store, and registers a listener so that any changes to that result will update .current. Read more.

useHasTableCell

The useHasTableCell hook returns a reactive object indicating whether a particular Cell is used anywhere in a Table, and registers a listener so that any changes to that result will update .current. Read more.

useHasTableCellListener

The useHasTableCellListener hook registers a listener that is called whenever a specified Cell Id is added to or removed from across a Table. Read more.

useHasTableListener

The useHasTableListener hook registers a listener that is called whenever a specified Table is added to or removed from the Store. Read more.

useResultTable

The useResultTable hook returns a reactive object reflecting a result Table in a Queries object, and registers a listener so that any changes to that result will update .current. Read more.

useResultTableCellIds

The useResultTableCellIds hook returns a reactive object reflecting the Ids of all Cells used across a result Table, and registers a listener so that any changes will update .current. Read more.

useResultTableCellIdsListener

The useResultTableCellIdsListener hook registers a listener that is called whenever the Cell Ids across a result Table change. Read more.

useResultTableListener

The useResultTableListener hook registers a listener that is called whenever the result Table of a query changes. Read more.

useTable

The useTable hook returns a reactive object reflecting a Table in a Store, and registers a listener so that any changes to that Table will update .current. Read more.

useTableCellIds

The useTableCellIds hook returns a reactive object reflecting the Ids of all Cells used across a Table, and registers a listener so that any changes to those Ids will update .current. Read more.

useTableCellIdsListener

The useTableCellIdsListener hook registers a listener that is called whenever the Cell Ids used across a Table change. Read more.

useTableListener

The useTableListener hook registers a listener that is called whenever data in a specified Table changes. Read more.

useLinkedRowIds

The useLinkedRowIds hook returns a reactive object reflecting the linked Row Ids in a Relationship, and registers a listener so that any changes will update .current. Read more.

useLinkedRowIdsListener

The useLinkedRowIdsListener hook registers a listener that is called whenever the linked Row Ids for a first Row change. Read more.

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. Read more.

useLocalRowIdsListener

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

useResultRowIds

The useResultRowIds hook returns a reactive object reflecting the Ids of the Rows in a result Table, and registers a listener so that any changes will update .current. Read more.

useResultRowIdsListener

The useResultRowIdsListener hook registers a listener that is called whenever the result Row Ids of a query change. Read more.

useResultSortedRowIds

The useResultSortedRowIds hook returns a reactive object reflecting the sorted Row Ids in a result Table, and registers a listener so that any changes will update .current. Read more.

useResultSortedRowIdsListener

The useResultSortedRowIdsListener hook registers a listener that is called whenever the sorted result Row Ids change. Read more.

useRowIds

The useRowIds hook returns a reactive object reflecting the Ids of the Rows in a Table, and registers a listener so that any changes will update .current. Read more.

useRowIdsListener

The useRowIdsListener hook registers a listener that is called whenever the Row Ids in a Table change. Read more.

useSliceRowIds

The useSliceRowIds hook returns a reactive object reflecting the Ids of the Rows in a Slice, and registers a listener so that any changes will update .current. Read more.

useSliceRowIdsListener

The useSliceRowIdsListener hook registers a listener that is called whenever the Row Ids in a Slice change. Read more.

useSortedRowIds

The useSortedRowIds hook returns a reactive object reflecting the sorted Row Ids in a Table, and registers a listener so that any changes will update .current. Read more.

useSortedRowIdsListener

The useSortedRowIdsListener hook registers a listener that is called whenever the sorted Row Ids in a Table change. Read more.

useHasRow

The useHasRow hook returns a reactive object indicating whether a Row exists in a Table, and registers a listener so that any changes to that result will update .current. Read more.

useHasRowListener

The useHasRowListener hook registers a listener that is called whenever a specified Row is added to or removed from a Table. Read more.

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. Read more.

useRemoteRowIdListener

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

useResultRow

The useResultRow hook returns a reactive object reflecting a result Row in a result Table, and registers a listener so that any changes will update .current. Read more.

useResultRowCount

The useResultRowCount hook returns a reactive object reflecting the number of Rows in a result Table, and registers a listener so that any changes will update .current. Read more.

useResultRowCountListener

The useResultRowCountListener hook registers a listener that is called whenever the count of result Rows changes. Read more.

useResultRowListener

The useResultRowListener hook registers a listener that is called whenever a result Row changes. Read more.

useRow

The useRow hook returns a reactive object reflecting a Row in a Table, and registers a listener so that any changes to that Row will update .current. Read more.

useRowCount

The useRowCount hook returns a reactive object reflecting the number of Rows in a Table, and registers a listener so that any changes will update .current. Read more.

useRowCountListener

The useRowCountListener hook registers a listener that is called whenever the count of Rows in a Table changes. Read more.

useRowListener

The useRowListener hook registers a listener that is called whenever data in a specified Row changes. Read more.

useCellIds

The useCellIds hook returns a reactive object reflecting the Ids of the Cells in a Row, and registers a listener so that any changes will update .current. Read more.

useCellIdsListener

The useCellIdsListener hook registers a listener that is called whenever the Cell Ids in a Row change. Read more.

useResultCellIds

The useResultCellIds hook returns a reactive object reflecting the Ids of the Cells in a result Row, and registers a listener so that any changes will update .current. Read more.

useResultCellIdsListener

The useResultCellIdsListener hook registers a listener that is called whenever the Cell Ids in a result Row change. Read more.

useBindableCell

The useBindableCell hook returns a reactive object reflecting the value of a Cell, with a settable current property that writes back to the Store. Read more.

useCell

The useCell hook returns a reactive object reflecting the value of a Cell in a Row in a Table, and registers a listener so that any changes to that Cell will update .current. Read more.

useCellListener

The useCellListener hook registers a listener that is called whenever the value of a specified Cell changes. Read more.

useHasCell

The useHasCell hook returns a reactive object indicating whether a Cell exists in a Row in a Table, and registers a listener so that any changes to that result will update .current. Read more.

useHasCellListener

The useHasCellListener hook registers a listener that is called whenever a specified Cell is added to or removed from a Row. Read more.

useResultCell

The useResultCell hook returns a reactive object reflecting the value of a Cell in a result Row, and registers a listener so that any changes will update .current. Read more.

useResultCellListener

The useResultCellListener hook registers a listener that is called whenever the value of a result Cell changes. Read more.

useHasValues

The useHasValues hook returns a reactive object indicating whether any Values exist in the Store, and registers a listener so that any changes to that result will update .current. Read more.

useHasValuesListener

The useHasValuesListener hook registers a listener that is called whenever any Values are added to or removed from the Store. Read more.

useParamValuesListener

The useParamValuesListener hook registers a listener that is called whenever the parameter values for a query change. Read more.

useValues

The useValues hook returns a reactive object reflecting the Values in the Store, and registers a listener so that any changes will update .current. Read more.

useValuesListener

The useValuesListener hook registers a listener that is called whenever any Values in the Store change. Read more.

useBindableValue

The useBindableValue hook returns a reactive object reflecting the value of a Value, with a settable current property that writes back to the Store. Read more.

useHasValue

The useHasValue hook returns a reactive object indicating whether a Value exists in the Store, and registers a listener so that any changes to that result will update .current. Read more.

useHasValueListener

The useHasValueListener hook registers a listener that is called whenever a specified Value is added to or removed from the Store. Read more.

useParamValueListener

The useParamValueListener hook registers a listener that is called whenever a specific parameter value for a query changes. Read more.

useValue

The useValue hook returns a reactive object reflecting the value of a Value in a Store, and registers a listener so that any changes to that Value will update .current. Read more.

useValueIds

The useValueIds hook returns a reactive object reflecting the Ids of the Values in a Store, and registers a listener so that any changes will update .current. Read more.

useValueIdsListener

The useValueIdsListener hook registers a listener that is called whenever the Value Ids in the Store change. Read more.

useValueListener

The useValueListener hook registers a listener that is called whenever the value of a specified Value changes. Read more.

useCheckpoint

The useCheckpoint hook returns a reactive object reflecting the label of a checkpoint, and registers a listener so that any changes will update .current. Read more.

useCheckpointIds

The useCheckpointIds hook returns a reactive object reflecting the CheckpointIds (backward, current, forward) in a Checkpoints object, and registers a listener so that any changes will update .current. Read more.

useCheckpointIdsListener

The useCheckpointIdsListener hook registers a listener that is called whenever the Checkpoint Ids change. Read more.

useCheckpointListener

The useCheckpointListener hook registers a listener that is called whenever the label of a specified Checkpoint changes. Read more.

useCheckpoints

The useCheckpoints hook returns the default Checkpoints object from the current Provider context (or a named one if an Id is provided). Read more.

useCheckpointsIds

The useCheckpointsIds hook returns a reactive object with the Ids of all Checkpoints objects registered in the current Provider context. Read more.

useCheckpointsOrCheckpointsById

The useCheckpointsOrCheckpointsById hook is used to get a reference to a Checkpoints object from a Provider context, or have it passed directly. Read more.

useDidFinishTransactionListener

The useDidFinishTransactionListener hook registers a listener called just after a Store transaction completes. Read more.

useGoBackwardCallback

The useGoBackwardCallback hook returns a callback function that, when called, moves the Checkpoints object backward to the previous checkpoint. Read more.

useGoForwardCallback

The useGoForwardCallback hook returns a callback function that, when called, moves the Checkpoints object forward to the next checkpoint. Read more.

useIndexIds

The useIndexIds hook returns a reactive object reflecting the Ids of the Indexes in an Indexes object, and registers a listener so that any changes will update .current. Read more.

useIndexes

The useIndexes hook returns the default Indexes object from the current Provider context (or a named one if an Id is provided). Read more.

useIndexesIds

The useIndexesIds hook returns a reactive object with the Ids of all Indexes objects registered in the current Provider context. Read more.

useIndexesOrIndexesById

The useIndexesOrIndexesById hook is used to get a reference to an Indexes object from a Provider context, or have it passed directly. Read more.

useMetric

The useMetric hook returns a reactive object reflecting the value of a named Metric in a Metrics object, and registers a listener so that any changes to that Metric will update .current. Read more.

useMetricIds

The useMetricIds hook returns a reactive object reflecting the Ids of the Metrics in a Metrics object, and registers a listener so that any changes will update .current. Read more.

useMetricListener

The useMetricListener hook registers a listener that is called whenever a specified Metric value changes. Read more.

useMetrics

The useMetrics hook returns the default Metrics object from the current Provider context (or a named one if an Id is provided). Read more.

useMetricsIds

The useMetricsIds hook returns a reactive object with the Ids of all Metrics objects registered in the current Provider context. Read more.

useMetricsOrMetricsById

The useMetricsOrMetricsById hook is used to get a reference to a Metrics object from a Provider context, or have it passed directly. Read more.

usePersister

The usePersister hook returns the default Persister from the current Provider context (or a named one if an Id is provided). Read more.

usePersisterIds

The usePersisterIds hook returns a reactive object with the Ids of all Persisters registered in the current Provider context. Read more.

usePersisterOrPersisterById

The usePersisterOrPersisterById hook is used to get a reference to a Persister object from a Provider context, or have it passed directly. Read more.

usePersisterStatus

The usePersisterStatus hook returns a reactive object reflecting the status of a Persister, and registers a listener so that any changes will update .current. Read more.

usePersisterStatusListener

The usePersisterStatusListener hook registers a listener that is called whenever the status of a Persister changes. Read more.

useQueries

The useQueries hook returns the default Queries object from the current Provider context (or a named one if an Id is provided). Read more.

useQueriesIds

The useQueriesIds hook returns a reactive object with the Ids of all Queries objects registered in the current Provider context. Read more.

useQueriesOrQueriesById

The useQueriesOrQueriesById hook is used to get a reference to a Queries object from a Provider context, or have it passed directly. Read more.

useQueryIds

The useQueryIds hook returns a reactive object reflecting the Ids of the Queries in a Queries object, and registers a listener so that any changes will update .current. Read more.

useRelationshipIds

The useRelationshipIds hook returns a reactive object reflecting the Ids of the Relationships in a Relationships object, and registers a listener so that any changes will update .current. Read more.

useRelationships

The useRelationships hook returns the default Relationships object from the current Provider context (or a named one if an Id is provided). Read more.

useRelationshipsIds

The useRelationshipsIds hook returns a reactive object with the Ids of all Relationships objects registered in the current Provider context. Read more.

useRelationshipsOrRelationshipsById

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

useSliceIds

The useSliceIds hook returns a reactive object reflecting the Ids of the Slices in an Index, and registers a listener so that any changes will update .current. Read more.

useSliceIdsListener

The useSliceIdsListener hook registers a listener that is called whenever the Slice Ids in an Index change. Read more.

useStartTransactionListener

The useStartTransactionListener hook registers a listener that is called at the start of every Store transaction. Read more.

useSynchronizer

The useSynchronizer hook returns the default Synchronizer from the current Provider context (or a named one if an Id is provided). Read more.

useSynchronizerIds

The useSynchronizerIds hook returns a reactive object with the Ids of all Synchronizers registered in the current Provider context. Read more.

useSynchronizerOrSynchronizerById

The useSynchronizerOrSynchronizerById hook is used to get a reference to a Synchronizer object from a Provider context, or have it passed directly. Read more.

useSynchronizerStatus

The useSynchronizerStatus hook returns a reactive object reflecting the status of a Synchronizer, and registers a listener so that any changes will update .current. Read more.

useSynchronizerStatusListener

The useSynchronizerStatusListener hook registers a listener that is called whenever the status of a Synchronizer changes. Read more.

useWillFinishTransactionListener

The useWillFinishTransactionListener hook registers a listener called just before a Store transaction completes. Read more.