github TanStack/db @tanstack/electric-db-collection@0.0.7

latest releases: @tanstack/trailbase-db-collection@0.1.12, @tanstack/svelte-db@0.1.12, @tanstack/vue-db@0.0.45...
one month ago

Patch Changes

  • Add explicit collection readiness detection with isReady() and markReady() (#270)

    • Add isReady() method to check if a collection is ready for use
    • Add onFirstReady() method to register callbacks for when collection becomes ready
    • Add markReady() to SyncConfig interface for sync implementations to explicitly signal readiness
    • Replace onFirstCommit() with onFirstReady() for better semantics
    • Update status state machine to allow loadingready transition for cases with no data to commit
    • Update all sync implementations (Electric, Query, Local-only, Local-storage) to use markReady()
    • Improve error handling by allowing collections to be marked ready even when sync errors occur

    This provides a more intuitive and ergonomic API for determining collection readiness, replacing the previous approach of using commits as a readiness signal.

  • Updated dependencies [1758eda, 20f810e]:

    • @tanstack/db@0.0.25

Don't miss a new db release

NewReleases is sending notifications on new releases.