DB Docs
API Reference
- Core API Reference
- Collection
- createCollection
- liveQueryCollectionOptions
- createLiveQueryCollection
- createOptimisticAction
- createTransaction
- Electric DB Collection
- electricCollectionOptions
- Query DB Collection
- queryCollectionOptions
- RxDB DB Collection
- rxdbCollectionOptions
- PowerSync Collection
- powerSyncCollectionOptions
- createIndexedDB
- indexedDBCollectionOptions
- React Hooks
- useLiveQuery
AI/LLM: This documentation page is available in plain markdown format at/db/latest/docs/reference/powersync-db-collection/type-aliases/EagerSyncHooks.md
EagerSyncHooks
ts
type EagerSyncHooks = object;Defined in: definitions.ts:173
Eager sync mode hooks. Called once when the collection sync starts and stops.
Properties#
onLoad()?#
ts
optional onLoad: () => CleanupFn | void | Promise<CleanupFn | void>;Defined in: definitions.ts:181
Called when the collection sync starts. Use this to set up external data sources (e.g. subscribing to a sync stream).
Returns#
CleanupFn | void | Promise<CleanupFn | void>
A cleanup function that is called when the collection sync is cleaned up.
onLoadSubset?#
ts
optional onLoadSubset: never;Defined in: definitions.ts:182
syncMode?#
ts
optional syncMode: "eager";Defined in: definitions.ts:174