MCPcopy Create free account
hub / github.com/TanStack/db / on

Method on

packages/db/src/collection/index.ts:948–953  ·  view source on GitHub ↗

* Subscribe to a collection event

(
    event: T,
    callback: CollectionEventHandler<T>,
  )

Source from the content-addressed store, hash-verified

946 * Subscribe to a collection event
947 */
948 public on<T extends keyof AllCollectionEvents>(
949 event: T,
950 callback: CollectionEventHandler<T>,
951 ) {
952 return this._events.on(event, callback)
953 }
954
955 /**
956 * Subscribe to a collection event once

Callers 7

subscribeChangesMethod · 0.45
constructorMethod · 0.45
startMethod · 0.45
setWindowMethod · 0.45
syncFnMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected