TinyBase logoTinyBase β

useStartTransactionListener

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

useStartTransactionListener(
  listener: TransactionListener,
  storeOrStoreId?: MaybeGetter<undefined | StoreOrStoreId>,
): void
TypeDescription
listenerTransactionListener

The function to call at transaction start.

storeOrStoreId?MaybeGetter<undefined | StoreOrStoreId>

The Store to use, or its Id.

returnsvoid

This has no return value.

Since

v8.1.0