StoreOperationCompleteHandler

See source code

Handler function called when a store operation (atomic transaction) completes. This is useful for performing actions after a batch of changes has been applied, such as triggering saves or sending notifications.

type StoreOperationCompleteHandler = (source: 'remote' | 'user') => void

Example

const handler: StoreOperationCompleteHandler = (source) => {
  if (source === 'user') {
    // Auto-save after user operations complete
    saveStoreSnapshot()
  }
}

Parameters

NameDescription

source

Whether the operation originated from 'user' interaction or 'remote' synchronization

Prev
StoreObjectRecordType
Next
StoreValidators