Skip to content

Releases: atomic-state/react-idbstore

v1.5.0

09 Dec 14:51

Choose a tag to compare

πŸ“¦ react-idbstore 1.5.0 Release Notes

The 1.5.0 release is a major reactive performance and developer-experience upgrade. This version introduces single-record reactive hooks, recursive field selection, and in-memory result caching for ultra-efficient rendering β€” all while remaining fully backward compatible.


πŸš€ Major Additions

New Reactive Hooks

Three new hooks are now available for precise, single-record subscriptions:

useRecord(where, select?)

Reactive version of findFirst that returns one matching record or null.

const user = store.useRecord({
  where: { id: 1 },
  select: { name: true, profile: { avatar: true } }
});

v1.4.2

08 Dec 19:22

Choose a tag to compare

πŸ“¦ react-idbstore 1.4.2 Release Notes

The 1.4.1 release is a focused API enhancement that introduces a new bulk deletion primitive while preserving full backward compatibility. This update improves developer ergonomics for cleanup-heavy workflows and sync pipelines.


New API Feature

deleteManyWhere(where)

A new high-level bulk deletion method has been added:

deleteManyWhere(where: WhereClause<StoreSchema>): Promise<number>

v1.3.0

08 Dec 03:49

Choose a tag to compare

πŸ“¦ react-idbstore 1.3.0 Release Notes

The 1.3.0 release is a performance, scalability, and correctness-focused update. It delivers major runtime optimizations for live queries and bulk synchronization while remaining fully backward compatible at the API level.

This version is especially beneficial for sync-heavy apps, offline-first workflows, and large local datasets.


πŸš€ Major Performance Improvements

Massively Faster updateByExternalKey

Removed the N+1 query pattern that caused one IndexedDB scan per update. The method now performs a single collection scan, in-memory matching, and one final bulkPut transaction. This results in orders-of-magnitude faster synchronization for large update batches.


Ultra-Fast useRecords Change Detection

Replaced repeated deep JSON serialization comparisons with a deterministic object hashing strategy using stable key ordering and constant-time hash comparisons. This dramatically reduces unnecessary React re-renders, CPU spikes during live updates, and memory pressure on large datasets.


Faster & Smarter WhereClause Evaluation

The internal condition evaluator now features early short-circuit exits for $and and $or, fully recursive nested object matching, and tighter boolean logic for complex filters. These changes result in 2–4Γ— faster filtering on deeply nested documents.


Data Integrity & Reliability

All multi-record operations now execute inside IndexedDB transactions, including:

  • addMany
  • deleteMany
  • updateAllWhere
  • updateByInternalId
  • updateByExternalKey

This guarantees atomic writes, crash safety, and eliminates partial updates under concurrency.


Developer Experience Enhancements

Unsafe TypeScript escapes have been removed in favor of safer, strongly-typed internal helpers. Internal object comparison is now deterministic and more predictable. Optional support was added for richer comparison operators in WhereClause (e.g., numeric and array matching) without breaking existing queries.


Backward Compatibility

  • No API changes
  • No signature changes
  • No return type changes
  • No required migration

Existing applications built on v1.2.x will continue to work unmodified.


⚠️ Behavioral Notes (Non-Breaking)

While the public API is fully compatible, two internal behaviors were intentionally upgraded:

  1. updateByExternalKey now updates all matching records per key instead of only the first match.
  2. Nested object matching is now strictly correct and fully recursive.

These changes fix subtle edge-case bugs and improve correctness, but may affect applications that relied on the previous loose matching behavior.


πŸ’‘ Breaking Changes

None. This is a backward-compatible performance and correctness release.

v1.2.0

08 Dec 03:32

Choose a tag to compare

πŸ“¦ react-idbstore 1.2.0 Release Notes

The 1.2.0 release introduces a suite of high-performance Bulk Update methods and a new, intuitive API for synchronizing data by arbitrary external keys.


✨ Major Features

This release focuses entirely on optimizing write operations and simplifying synchronization:

  • Optimized Bulk Update API: The store factory now includes three powerful, transactional update methods:
    • updateAllWhere(where, changes): Performs a bulk update by applying the same static change to all records matching the complex WhereClause criteria (e.g., mark all 'low priority' items as 'completed').
    • updateByInternalId(updates): The fastest way to merge changes, performing a bulk update on multiple records using their internal IndexedDB primary key (id). This is the recommended method for processing arrays of updates where the local ID is known.
    • updateByExternalKey(updates): The flexible synchronization tool, allowing you to update multiple unique items by matching on any arbitrary property (e.g., uuid or serverId), and applying unique changes to each one. This method performs sequential lookups but executes the final write as a single, high-performance transaction.

πŸš€ Key Enhancements

  1. High-Performance Merging: The updateByInternalId method uses a single bulkPut transaction for the merge, guaranteeing the fastest possible performance when updating multiple records by their internal ID.
  2. Robust Synchronization: The updateByExternalKey method internally converts external lookup keys (e.g., key: 'uuid') into the local internal ID, allowing for reliable, item-specific updates from server data feeds.

πŸ’‘ Breaking Changes

  • None. This is a backward-compatible feature addition.

v1.1.0

07 Dec 21:12

Choose a tag to compare

πŸ“¦ react-idbstore 1.1.0 Release Notes

The 1.1.0 release introduces new imperative read functions

✨ New Features

  • Imperative Read API: Added three new async functions for fast, one-time data fetching outside of reactive components:
    • findFirst(where): Efficiently finds the oldest matching record.
    • findLast(where): Efficiently finds the newest matching record.
    • findMany(where): Finds all matching records matching the criteria.
  • Tab Synchronization: Added information about tab sync

πŸš€ Key Enhancements

  • Updated Documentation: The README has been fully updated to include the new imperative read functions.

πŸ’‘ Breaking Changes

  • None. This is a backward-compatible feature release.

v1.0.1

07 Dec 12:19

Choose a tag to compare

πŸ“¦ react-idbstore 1.0.1 Release Notes

This is a documentation-focused release for stability and clarity.

πŸ“ Clarification

  • Data Relationship Trade-Off: Added explicit documentation explaining that native, cross-store database joins are not supported due to the architectural choice of isolated IndexedDB stores. The documentation now guides users to handle relationships via client-side data mapping.

πŸ’‘ Breaking Changes

  • None. This is a non-breaking documentation update.

v1.0.0

07 Dec 12:07

Choose a tag to compare

πŸ“¦ react-idbstore 1.0.0 Release Notes

The 1.0.0 release introduces the stable core API for managing isolated, highly performant IndexedDB stores within React applications.

✨ Major Features

This release establishes the full feature set of react-idbstore:

  • Store Factory (createIDBStore): Provides a reusable factory pattern to generate isolated data stores for any TypeScript schema.

  • Complete CRUD API: Full support for single and bulk operations (addItem, addMany, updateItem, deleteItem, deleteMany).

  • Live Data Hook (useRecords): A performance-optimized hook that subscribes components to real-time data changes.

  • Robust Type System: Complete TypeScript integration using StoreSchema and WhereClause<T> to ensure type safety across all operations.

πŸš€ Key Enhancements and Optimizations

  1. Smart Performance Optimization: Implemented a deep equality comparison within the useRecords subscription to prevent unnecessary React re-renders when the underlying data is content-identical.
  2. Advanced Query Syntax: Introduced support for MongoDB-style logical operators ($and, $or) within the where clause, enabling complex client-side filtering.
  3. Enhanced Robustness: Ensured all asynchronous write operations (addItem, updateItem, etc.) correctly propagate database errors using throw err, providing calling components with reliable failure handling.
  4. Clean Data Structure: All retrieved records are returned in the consistent structure { id: number, object: StoreSchema }.

πŸ’‘ Breaking Changes

  • None. This is the initial stable release.