github TanStack/db @tanstack/query-db-collection@0.2.23

Patch Changes

  • Fix staleTime behavior by automatically subscribing/unsubscribing from TanStack Query based on collection subscriber count. (#462)

    Previously, query collections kept a QueryObserver permanently subscribed, which broke TanStack Query's staleTime and window-focus refetch behavior. Now the QueryObserver properly goes inactive when the collection has no subscribers, restoring normal staleTime/gcTime semantics.

  • query-collection now supports a select function to transform raw query results into an array of items. This is useful for APIs that return data with metadata or nested structures, ensuring metadata remains cached while collections work with the unwrapped array. (#551)

  • Updated dependencies [51c6bc5, 248e2c6, ce7e2b2, 1b832ff]:

    • @tanstack/db@0.4.2

Don't miss a new db release

NewReleases is sending notifications on new releases.