You are viewing Use Data Query v0.1.0, snapshotted 2026-11-09. The latest is v0.1.2. Go to the latest →
Changelog up to v0.1.0
v0.1.0
Minor Changes
- b2e862d:
useDataQuery takes a refetchInterval (a delay, false, or a function that gets the last data and picks the next delay) so a read can check again on a schedule while it is enabled. Additive: reads without it behave as before.
- 35c3f28: New hook package:
useDataQuery and useCursorQuery, the one wrapper over TanStack Query for the apps. useCursorQuery loads a keyset-paged list one page at a time: the first page comes from the caller, only later pages are cached in memory, a failed page keeps the rows and waits for retry, and a row seen twice is kept once. DataQueryProvider mounts the cache so an app never imports the query library, and useInvalidateData drops cached lists by key prefix after a change. @tanstack/react-query is a regular dependency of the package, not a peer, so an app installs one package. The later pages of a list stay cached for 30 seconds after it unmounts.