• Runs a ditto live query on the collections collection. Eg:

    const { documents } = useCollections({ path: myPath, sort: { propertyPath: 'name', direction: 'descending' as SortDirection, }, limit: 2 })

    Parameters

    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