- useCollections(params): {
collectionsEvent: CollectionsEvent | undefined;
ditto: Ditto;
documents: Collection[];
liveQuery: LiveQuery | undefined;
subscription: Subscription | undefined;
} Returns {
collectionsEvent: CollectionsEvent | undefined;
ditto: Ditto;
documents: Collection[];
liveQuery: LiveQuery | undefined;
subscription: Subscription | undefined;
}
collectionsEvent: CollectionsEvent | undefined
ditto: Ditto
documents: Collection[]
liveQuery: LiveQuery | undefined
subscription: Subscription | undefined
Runs a ditto live query on the collections collection. Eg:
const { documents } = useCollections({ path: myPath, sort: { propertyPath: 'name', direction: 'descending' as SortDirection, }, limit: 2 })