Skip to content
Source
Sign inSign up
TanStack/db

Add loadSubset State Tracking and On-Demand Sync Mode #669

Mergedsamwillis(GitHub profile, opens in a new tab)merged 15 commits intomain fromrefs/pull/669/headmerged by samwillis(GitHub profile, opens in a new tab)

Overview

This PR adds comprehensive loading status tracking to collections and live queries, enabling UIs to display loading indicators when more data is being fetched. It also introduces a new syncMode configuration option to control when collections load data - either eagerly on initial sync or on-demand as queries request it.

Problem

  1. No Loading Indicators: When live queries pushed predicates down to source collections via syncMore, there was no indication that data was being loaded. This made it impossible to show proper loading states in the UI.

  2. Always-Eager Loading: Collections always loaded all data immediately during initial sync, even when using predicate pushdown. There was no way to configure collections to only load data as it was requested by queries.

Solution

This PR implements a multi-layered loading state tracking system with configurable sync modes:

Loading State Tracking

  1. Collection Subscriptions: Track their own loading state when requesting snapshots, with a public Subscription interface for external consumers
  2. Collections: Track pending load promises and expose an isLoadingSubset property
  3. Live Queries: Automatically reflect the loading state of their source collection subscriptions

Key Isolation Property: Each live query maintains its own loading state based on its own subscriptions. When a live query triggers loading via predicate pushdown, only that live query's isLoadingSubset becomes true. Other live queries that share the same source collection but don't need that specific snapshot remain unaffected.

Sync Modes

Collections can now be configured with two sync modes:

  • eager (default): Loads all data immediately during initial sync. loadSubset calls are bypassed.
  • on-demand: Only loads data as it's requested via loadSubset calls. Requires a loadSubset handler.

Changes

1. Renamed syncMore/loadMore to loadSubset

Files: packages/db/src/collection/sync.ts, packages/db/src/types.ts, packages/db/src/collection/subscription.ts

  • Renamed syncMore → loadSubset (collection method)
  • Renamed onLoadMore → loadSubset (sync config property)
  • Renamed OnLoadMoreOptions → LoadSubsetOptions (type)
  • Renamed syncOnLoadMoreFn → syncLoadSubsetFn (internal)
  • Renamed pendingLoadMorePromises → pendingLoadSubsetPromises (internal)

Rationale: "loadSubset" better reflects that this operation loads a filtered/limited subset of data, not just "more" data.

2. Added syncMode Configuration

Files: packages/db/src/types.ts, packages/db/src/collection/sync.ts

New syncMode property on collection config:

type SyncMode = 'eager' | 'on-demand'

interface CollectionConfig {
  syncMode?: SyncMode // defaults to 'eager'
  // ... other properties
}

Behavior:

  • eager (default): loadSubset is bypassed and returns undefined. All data is loaded during initial sync.
  • on-demand: loadSubset calls proceed normally. Data is only loaded as requested.

Validation:

  • If syncMode: 'on-demand' is set but no loadSubset handler is provided, throws CollectionConfigurationError with a helpful message
  • Validation occurs when the sync function is first called

3. Standardized loadSubset Return Type

Files: packages/db/src/collection/sync.ts, packages/db/src/types.ts

  • Changed to consistently return Promise<void> | undefined
  • Returns undefined when syncMode is 'eager' or no sync implementation is configured
  • Wraps synchronous loadSubset results in Promise.resolve()
  • Updated SyncConfigRes['loadSubset'] type signature

4. CollectionSubscription Status Tracking & Events

File: packages/db/src/collection/subscription.ts

Added comprehensive status tracking:

  • Status Property: status: 'ready' | 'loadingSubset' (readonly getter with private mutable field)
  • Concurrent Tracking: pendingLoadSubsetPromises: Set<Promise<void>>
  • Events:
    • status:change - Emitted when status transitions
    • status:ready - Emitted when entering ready state
    • status:loadingSubset - Emitted when entering loading state
    • unsubscribed - New event emitted when subscription is destroyed
  • Error Handling: Status returns to ready even on promise rejection
  • Cleanup: unsubscribe() emits unsubscribed event before clearing listeners

5. Generic isLoadingSubset for All Collections

Files: packages/db/src/collection/sync.ts, packages/db/src/collection/index.ts, packages/db/src/collection/events.ts

All collections now track their loading state:

  • Property: isLoadingSubset (boolean getter, not a method)
  • Tracking: pendingLoadSubsetPromises: Set<Promise<void>> in CollectionSyncManager
  • Events: loadingSubset:change event when state transitions
  • API: trackLoadPromise(promise: Promise<void>) method for internal coordination
  • Access: Made _sync public on Collection for internal use

6. Live Query Integration

Files: packages/db/src/query/live/collection-subscriber.ts, packages/db/src/query/live/collection-config-builder.ts

Live queries reflect loading state from their subscriptions:

  • CollectionSubscriber subscribes to subscription status:change events
  • Creates deferred promises when subscriptions enter loadingSubset state
  • Passes promises to result collection via liveQueryCollection.trackLoadPromise()
  • Result collection's isLoadingSubset reflects subscription loading states
  • Proper cleanup on unsubscribe (resolves pending promises)

Loading State Isolation: Each live query's subscriptions are independent. Query A triggering loadSubset doesn't affect Query B's isLoadingSubset status.

7. Subscription Interface for External Consumers

File: packages/db/src/types.ts

New public Subscription interface:

export interface Subscription extends EventEmitter<SubscriptionEvents> {
  readonly status: SubscriptionStatus
}

export type LoadSubsetOptions = {
  where?: BasicExpression<boolean>
  orderBy?: OrderBy
  limit?: number
  subscription?: Subscription // Optional, for sync implementation use
}

Purpose: Allows sync implementations to:

  • Track which subscription triggered a loadSubset call
  • Subscribe to subscription lifecycle events (e.g., unsubscribed)
  • Implement advanced caching/ref-counting based on subscription lifecycle

8. Reusable Event Emitter

File: packages/db/src/event-emitter.ts (new)

Extracted event emitter logic into a reusable base class:

  • Type-Safe: Generic EventEmitter<TEvents> with full type safety
  • Methods: on, once, off, waitFor
  • Protected: emitInner (for subclass use), clearListeners
  • Error Handling: Re-throws listener errors via queueMicrotask
  • Usage:
    • CollectionEventsManager extends it and wraps emitInner with public emit
    • CollectionSubscription extends it and uses emitInner internally

9. Fixed Local-Only Collection Types

File: packages/db/src/local-only.ts

Fixed mutation function typing issues:

  • Wrapper functions now accept broader UtilsRecord type parameters
  • Properly handles contravariance in function parameter types
  • Removed unnecessary type casts in return statement

10. Comprehensive Test Coverage

Files: packages/db/tests/collection-subscription.test.ts, packages/db/tests/collection.test.ts, packages/db/tests/query/live-query-collection.test.ts

Added extensive test suites:

  • CollectionSubscription: Status tracking, event emission, concurrent promises, error handling, cleanup
  • Collection.isLoadingSubset: Property tracking, event emission, concurrent loads, error handling
  • Live Query Integration: Result collection reflects subscription states, isolation between queries
  • All tests using loadSubset: Updated to use syncMode: 'on-demand'

11. Enhanced setWindow with Loading Awareness

File: packages/db/src/query/live/collection-config-builder.ts

The setWindow utility function now returns a value that indicates whether subset loading was triggered, allowing callers to wait for data loading to complete:

Return Type: true | Promise<void>

  • Returns true when isLoadingSubset is false after calling the window function - no loading was triggered
  • Returns Promise<void> when isLoadingSubset is true - loading was triggered and the promise resolves when loading completes

Implementation Details:

  • After calling windowFn() and maybeRunGraphFn(), checks this.liveQueryCollection?.isLoadingSubset
  • If loading is active, subscribes to the loadingSubset:change event
  • Returns a promise that resolves when isLoadingSubset becomes false
  • Automatically unsubscribes from the event once loading completes

Usage Pattern:

const result = liveQuery.utils.setWindow({ offset: 10, limit: 20 })

// Type guard pattern
if (result !== true) {
  // Loading was triggered, wait for it to complete
  await result
  console.log('Data loaded and window updated')
} else {
  // No loading needed, window updated immediately
  console.log('Window updated synchronously')
}

// Or simply always await (works with both return types)
const result = liveQuery.utils.setWindow({ offset: 10, limit: 20 })
if (result !== true) {
  await result
}

Test Coverage:

  • Test that setWindow returns true when no loading is triggered
  • Integration test that validates the full async flow with fake timers:
    • Verifies Promise<void> is returned when loading is triggered
    • Confirms isLoadingSubset becomes true during loading
    • Validates promise doesn't resolve until loading completes
    • Checks isLoadingSubset returns to false after resolution
    • Verifies correct data is loaded in the new window

API

Sync Mode Configuration

// Eager mode (default) - loads all data immediately
const eagerCollection = createCollection({
  getKey: (item) => item.id,
  syncMode: 'eager', // optional, this is the default
  sync: {
    sync: ({ begin, write, commit, markReady }) => {
      // Load all data here
      begin()
      allData.forEach(item => write({ type: 'insert', value: item }))
      commit()
      markReady()
    }
  }
})

// On-demand mode - only loads data as requested
const onDemandCollection = createCollection({
  getKey: (item) => item.id,
  syncMode: 'on-demand',
  sync: {
    sync: ({ markReady }) => {
      markReady() // Don't load data initially
      
      return {
        // Required for on-demand mode
        loadSubset: async (options) => {
          const { where, limit, orderBy, subscription } = options
          // Load only the requested subset
          const data = await fetchDataSubset(where, limit, orderBy)
          // ... apply data to collection
        }
      }
    }
  }
})

Collection Subscription

const subscription = collection.subscribeChanges(callback, options)

// Status property
console.log(subscription.status) // 'ready' | 'loadingSubset'

// Event listeners
subscription.on('status:change', (event) => {
  console.log(`Status: ${event.previousStatus} → ${event.status}`)
})

subscription.on('status:loadingSubset', (event) => {
  console.log('Loading more data...')
})

subscription.on('status:ready', (event) => {
  console.log('Data loaded')
})

subscription.on('unsubscribed', (event) => {
  console.log('Subscription destroyed')
})

// Cleanup
subscription.unsubscribe()

Collection

// All collections have isLoadingSubset property
console.log(collection.isLoadingSubset) // boolean

// Listen for loading state changes
collection.on('loadingSubset:change', (event) => {
  console.log(`Loading: ${event.isLoadingSubset}`)
})

Live Query

const liveQuery = createLiveQueryCollection({
  query: (q) => q.from({ users: userCollection })
    .where(({ users }) => users.active)
})

// Result collection automatically tracks loading from subscriptions
console.log(liveQuery.isLoadingSubset) // boolean

liveQuery.on('loadingSubset:change', (event) => {
  if (event.isLoadingSubset) {
    showLoadingSpinner()
  } else {
    hideLoadingSpinner()
  }
})

Breaking Changes

Renamed Methods and Types

  • syncMore → loadSubset (collection method)
  • onLoadMore → loadSubset (sync config property)
  • OnLoadMoreOptions → LoadSubsetOptions (type)

Migration:

// Before
const result = await collection.syncMore({ where: expr })
sync: {
  sync: () => ({
    onLoadMore: (options) => { /* ... */ }
  })
}

// After
const result = await collection._sync.loadSubset({ where: expr })
sync: {
  sync: () => ({
    loadSubset: (options) => { /* ... */ }
  })
}

Note: loadSubset is now called via collection._sync.loadSubset() as it's an internal coordination API, not for general public use.

Migration Guide

For Collection Users

No changes required if you're just using collections - isLoadingSubset is automatically available.

For Sync Implementers

  1. Rename onLoadMore to loadSubset:
// Before
return { onLoadMore: (options) => { /* ... */ } }

// After  
return { loadSubset: (options) => { /* ... */ } }
  1. (Optional) Use the new subscription parameter for advanced use cases:
return {
  loadSubset: (options) => {
    // Track which subscription triggered this
    const sub = options.subscription
    
    // Can subscribe to unsubscribe event for cleanup
    sub?.on('unsubscribed', () => {
      // Clean up resources for this subscription
    })
  }
}
  1. (Optional) Configure syncMode for on-demand loading:
createCollection({
  syncMode: 'on-demand', // Only load data as requested
  sync: {
    sync: ({ markReady }) => {
      markReady()
      return {
        loadSubset: async (options) => { /* load subset */ }
      }
    }
  }
})
    1. 🦋 Changeset detected

      Latest commit: f31a67e4f6e7ee26d1f1f42df7cbd2a651909c69

      The changes in this PR will be included in the next version bump.

      This PR includes changesets to release 12 packages
      NameType
      @tanstack/dbPatch
      @tanstack/react-dbPatch
      @tanstack/angular-dbPatch
      @tanstack/electric-db-collectionPatch
      @tanstack/query-db-collectionPatch
      @tanstack/rxdb-db-collectionPatch
      @tanstack/solid-dbPatch
      @tanstack/svelte-dbPatch
      @tanstack/trailbase-db-collectionPatch
      @tanstack/vue-dbPatch
      todosPatch
      @tanstack/db-example-react-todoPatch

      Not sure what this means? Click here to learn what changesets are.

      Click here if you're a maintainer who wants to add another changeset to this PR

    2. More templates

      @tanstack/angular-db

      npm i https://pkg.pr.new/@tanstack/angular-db@669

      @tanstack/db

      npm i https://pkg.pr.new/@tanstack/db@669

      @tanstack/db-ivm

      npm i https://pkg.pr.new/@tanstack/db-ivm@669

      @tanstack/electric-db-collection

      npm i https://pkg.pr.new/@tanstack/electric-db-collection@669

      @tanstack/query-db-collection

      npm i https://pkg.pr.new/@tanstack/query-db-collection@669

      @tanstack/react-db

      npm i https://pkg.pr.new/@tanstack/react-db@669

      @tanstack/rxdb-db-collection

      npm i https://pkg.pr.new/@tanstack/rxdb-db-collection@669

      @tanstack/solid-db

      npm i https://pkg.pr.new/@tanstack/solid-db@669

      @tanstack/svelte-db

      npm i https://pkg.pr.new/@tanstack/svelte-db@669

      @tanstack/trailbase-db-collection

      npm i https://pkg.pr.new/@tanstack/trailbase-db-collection@669

      @tanstack/vue-db

      npm i https://pkg.pr.new/@tanstack/vue-db@669

      commit: 1c54b1b

    3. Size Change: 0 B

      Total Size: 83.6 kB

      ℹ️ View Unchanged
      FilenameSize
      ./packages/db/dist/esm/collection/change-events.js963 B
      ./packages/db/dist/esm/collection/changes.js1.01 kB
      ./packages/db/dist/esm/collection/events.js413 B
      ./packages/db/dist/esm/collection/index.js3.23 kB
      ./packages/db/dist/esm/collection/indexes.js1.16 kB
      ./packages/db/dist/esm/collection/lifecycle.js1.8 kB
      ./packages/db/dist/esm/collection/mutations.js2.52 kB
      ./packages/db/dist/esm/collection/state.js3.79 kB
      ./packages/db/dist/esm/collection/subscription.js2.2 kB
      ./packages/db/dist/esm/collection/sync.js2.2 kB
      ./packages/db/dist/esm/deferred.js230 B
      ./packages/db/dist/esm/errors.js3.57 kB
      ./packages/db/dist/esm/event-emitter.js798 B
      ./packages/db/dist/esm/index.js1.65 kB
      ./packages/db/dist/esm/indexes/auto-index.js794 B
      ./packages/db/dist/esm/indexes/base-index.js835 B
      ./packages/db/dist/esm/indexes/btree-index.js2 kB
      ./packages/db/dist/esm/indexes/lazy-index.js1.21 kB
      ./packages/db/dist/esm/indexes/reverse-index.js577 B
      ./packages/db/dist/esm/local-only.js967 B
      ./packages/db/dist/esm/local-storage.js2.33 kB
      ./packages/db/dist/esm/optimistic-action.js294 B
      ./packages/db/dist/esm/proxy.js3.86 kB
      ./packages/db/dist/esm/query/builder/functions.js615 B
      ./packages/db/dist/esm/query/builder/index.js4.04 kB
      ./packages/db/dist/esm/query/builder/ref-proxy.js938 B
      ./packages/db/dist/esm/query/compiler/evaluators.js1.55 kB
      ./packages/db/dist/esm/query/compiler/expressions.js760 B
      ./packages/db/dist/esm/query/compiler/group-by.js2.04 kB
      ./packages/db/dist/esm/query/compiler/index.js2.21 kB
      ./packages/db/dist/esm/query/compiler/joins.js2.65 kB
      ./packages/db/dist/esm/query/compiler/order-by.js1.43 kB
      ./packages/db/dist/esm/query/compiler/select.js1.28 kB
      ./packages/db/dist/esm/query/ir.js785 B
      ./packages/db/dist/esm/query/live-query-collection.js404 B
      ./packages/db/dist/esm/query/live/collection-config-builder.js5.49 kB
      ./packages/db/dist/esm/query/live/collection-registry.js233 B
      ./packages/db/dist/esm/query/live/collection-subscriber.js2.11 kB
      ./packages/db/dist/esm/query/optimizer.js3.26 kB
      ./packages/db/dist/esm/scheduler.js1.29 kB
      ./packages/db/dist/esm/SortedMap.js1.24 kB
      ./packages/db/dist/esm/transactions.js3.05 kB
      ./packages/db/dist/esm/utils.js1.01 kB
      ./packages/db/dist/esm/utils/browser-polyfills.js365 B
      ./packages/db/dist/esm/utils/btree.js6.01 kB
      ./packages/db/dist/esm/utils/comparison.js754 B
      ./packages/db/dist/esm/utils/index-optimization.js1.73 kB
      compressed-size-action::db-package-size
    4. Size Change: 0 B

      Total Size: 2.36 kB

      ℹ️ View Unchanged
      FilenameSize
      ./packages/react-db/dist/esm/index.js168 B
      ./packages/react-db/dist/esm/useLiveInfiniteQuery.js885 B
      ./packages/react-db/dist/esm/useLiveQuery.js1.31 kB
      compressed-size-action::react-db-package-size
    5. OutdatedResolvedby samwillis(GitHub profile, opens in a new tab)
      packages/db/tests/query/live-query-collection.test.ts line 1014Outdated
      @@ -939,0 +994,21 @@
      994+ sync: {
      995+ sync: ({ markReady, begin, write, commit }) => {
      996+ begin()
      997+ write({ type: `insert`, value: { id: `1`, value: 1 } })
      998+ commit()
      999+ markReady()
      1000+ return {
      1001+ loadSubset: () => loadSubsetPromise,
      1002+ }
      1003+ },
      1004+ },
      1005+ })
      1006+
      1007+ const liveQuery = createLiveQueryCollection({
      1008+ query: (q) => q.from({ item: sourceCollection }),
      1009+ startSync: true,
      1010+ })
      1011+
      1012+ await liveQuery.preload()
      1013+
      1014+ // Calling loadSubset directly on source collection sets its own isLoadingMore

      I thought the plan here was isLoadingMore is true only if a live query calls updatePredicate? Otherwise a live query would be see there isLoadingMore set to true when e.g. a joined collection needs to grab an object, etc. So any UI set to this would be flickering on and off seemingly randomly w/o any way to control it by the dev.

      This bit of the code all dates to when I was working over the weekend. Will update...

      I do wander if we need to expose that it is grabbing data from the server though, joins lazy appearing without the dev being able to put a placeholder/spinner does feel messy.

      Maybe we need to separate flags?

      Also not that this version from the weekend made the isLoadingMore prop a standard on all collections. For base collections it's true when their own loadSubset is pending, for live query collections it's when a subscription trigger a loadSubset that returns a promise.

      Maybe we need an isLoadingMore and a isLoadingSubset, the latter whenever any subset triggered by the collection is loading, and isLoadingMore for when it's triggered by an offset/limit change (which do not isn't complete yet, and not in this PR)

      To fully implement this as only triggered when the offset/limit is changed we will have to rebase this PR on #663 or wait till thats merged. I suggest we leave the implementation as is now (setting isLoading on any subscription triggering a loadSubset) and fix in a future PR.

      https://github.com/TanStack/db/blob/9ad11697a32145476ec3a7caf3cebd31bed1711f/packages/db/src/query/live/collection-subscriber.ts#L77-L84

      The question is if collection. isLoadingMore should be collection.isLoadingSubset and that isLoadingMore is a live query only thing?

    6. samwillis(GitHub profile, opens in a new tab)replied on packages/db/src/collection/sync.ts line 317

      hmm need to check why it's wrapping it there...

      Returning void/undefined (synchronicity) makes it easy to check if a promise was returned as it's thruthy. Returning undefined if there is noting to do makes the code simpler than true - no typeof checks - but happy to change.

    7. samwillis(GitHub profile, opens in a new tab)replied on packages/db/tests/query/live-query-collection.test.ts line 1014

      This bit of the code all dates to when I was working over the weekend. Will update...

      I do wander if we need to expose that it is grabbing data from the server though, joins lazy appearing without the dev being able to put a placeholder/spinner does feel messy.

      Maybe we need to separate flags?

      Also not that this version from the weekend made the isLoadingMore prop a standard on all collections. For base collections it's true when their own loadSubset is pending, for live query collections it's when a subscription trigger a loadSubset that returns a promise.

    8. samwillis(GitHub profile, opens in a new tab)replied on packages/db/tests/query/live-query-collection.test.ts line 1014

      Maybe we need an isLoadingMore and a isLoadingSubset, the latter whenever any subset triggered by the collection is loading, and isLoadingMore for when it's triggered by an offset/limit change (which do not isn't complete yet, and not in this PR)

    9. samwillis(GitHub profile, opens in a new tab)replied on packages/db/src/collection/sync.ts line 317

      I've changed to return Promise<void> | true and check synchronously before setting status.

    10. samwillis(GitHub profile, opens in a new tab)replied on packages/db/tests/query/live-query-collection.test.ts line 1014

      To fully implement this as only triggered when the offset/limit is changed we will have to rebase this PR on #663 or wait till thats merged. I suggest we leave the implementation as is now (setting isLoading on any subscription triggering a loadSubset) and fix in a future PR.

      https://github.com/TanStack/db/blob/9ad11697a32145476ec3a7caf3cebd31bed1711f/packages/db/src/query/live/collection-subscriber.ts#L77-L84

      The question is if collection. isLoadingMore should be collection.isLoadingSubset and that isLoadingMore is a live query only thing?

    11. kevin-dp(GitHub profile, opens in a new tab) approved these changes

      Nice work, left a few minor comments.

      OutdatedResolvedby samwillis(GitHub profile, opens in a new tab)
      OutdatedResolvedby samwillis(GitHub profile, opens in a new tab)
      OutdatedResolvedby samwillis(GitHub profile, opens in a new tab)
      OutdatedResolvedby samwillis(GitHub profile, opens in a new tab)
      packages/db/src/collection/index.ts line 372
      @@ -364,9 +372,6 @@
      364372 }
      365373
      366374 /**
      367- * Requests the sync layer to load more data.
      368- * @param options Options to control what data is being loaded
      369- * @returns If data loading is asynchronous, this method returns a promise that resolves when the data is loaded.
      370- * If data loading is synchronous, the data is loaded when the method returns.
      375+ * Tracks a load promise for isLoadingMore state.
      376+ * @internal This is for internal coordination (e.g., live-query glue code), not for general use.
      371377 */
      372- public syncMore(options: OnLoadMoreOptions): void | Promise<void> {

      I would rather keep this method such that we can keep the _sync property private

      I disagree, syncMore is an internal method that shouldering be presented on the front he public api. The managers having the underscore marks them as "internal implementation but exposed for debugging and internal communication". I would prefer to not present syncMore on the prompts when people are interacting with a collection.

      packages/db/src/collection/subscription.ts line 183Outdated
      @@ -121,7 +174,10 @@
      121174
      122175 // Request the sync layer to load more data
      123176 // don't await it, we will load the data into the collection when it comes in
      124- this.collection.syncMore({
      177+ const syncResult = this.collection._sync.loadSubset({
      125178 where: stateOpts.where,
      179+ subscription: this,
      126180 })
      127181
      182+ // Track the promise if it's actually a promise (async work)
      183+ if (syncResult instanceof Promise) {

      Should we also check that the promise is not yet resolved? Because if it is already resolved then there is no need to do the below as that may lead to some flickering in the UI if one would e.g. show a spinner when more is loading.

      Unfortunately there is no api to do this, thats why loadSubset can return true to indicate that it has the data synchronously.

      OutdatedResolvedby samwillis(GitHub profile, opens in a new tab)
      OutdatedResolvedby samwillis(GitHub profile, opens in a new tab)
    12. samwillis(GitHub profile, opens in a new tab)replied on packages/db/src/collection/index.ts line 372

      I disagree, syncMore is an internal method that shouldering be presented on the front he public api. The managers having the underscore marks them as "internal implementation but exposed for debugging and internal communication". I would prefer to not present syncMore on the prompts when people are interacting with a collection.

    13. samwillis(GitHub profile, opens in a new tab)replied on packages/db/src/collection/subscription.ts line 183

      Unfortunately there is no api to do this, thats why loadSubset can return true to indicate that it has the data synchronously.

    14. 🎉 This PR has been released!

      Thank you for your contribution!

Sign in to join this conversation.