RxDB 17.0.0 (beta)
RxDB 17 focuses on better reactivity, improved debugging, and important storage fixes, while also graduating several long-standing plugins out of beta.
Most applications can upgrade easily, but users of OPFS and filesystem-based storages must review the migration notes carefully.
Migrationโ
RxDB 17 is mostly backward-compatible, but please review the following points before upgrading:
Storage migration requiredโ
If you use any of the following storages, you must migrate your data using the storage migrator:
- OPFS RxStorage
- Filesystem RxStorage (Node)
- IndexedDB RxStorage (if you use attachments)
For all other RxStorages, data created with RxDB v16 can be reused directly in RxDB v17.
Other migration notesโ
- The GitHub repository no longer contains prebuilt
distfiles.
Install RxDB from npm or run the build scripts locally. toggleOnDocumentVisiblenow defaults totrue. #6810- Schema fields marked as
finalno longer need to be explicitly listed asrequired. - Some integrations now use optional peer dependencies. You may need to install them manually:
firebasemongodbnats
CHANGESโ
Featuresโ
- Added react-hooks plugin.
๐ Reactivity & APIsโ
- ADD
RxDatabase.collections$observable for reactive access to collections - ADD support for the JavaScript
usingkeyword to automatically remove databases in tests - ADD new
reactivity-angularpackage - CHANGE moved
reactivity-vueandreactivity-preact-signalsfrom premium to core - FIX query results becoming incorrect when changes occur faster than query update #7067
๐ง Debugging & Developer Experienceโ
- ADD
contextfield to all RxDB write errors for easier debugging - ADD improved OPFS RxStorage error logging in
devMode, including:- strict
TextDecodermode - detailed decoding error output
- strict
- ADD internal
WeakRefTypeScript types so users no longer need to enableES2021.WeakRef - ADD llms.txt for LLM-friendly documentation access
- CHANGE
toggleOnDocumentVisiblenow defaults totrue#6810
๐๏ธ Storage & Replication Fixesโ
- FIX OPFS RxStorage memory and cleanup leaks
- FIX memory-mapped storage not purging deleted documents
- FIX
RxCollection.cleanup()ignoringminimumDeletedTime - FIX short primary key lengths not matching replication schema #7587
- FIX retry DenoKV commits when encountering
"database is locked"errors - FIX close broadcast channels and leader election after database shutdown, not during
- CHANGE: Store data as binary in IndexedDB to use less disc space.
- CHANGE: Pull-Only replications no longer store the server metadata on the client.
๐ Schema & Index Validationโ
- ADD enforce maximum length for indexes and primary keys (
maxLength: 2048) - CHANGE
finalschema fields no longer need to be marked asrequired
โ๏ธ Performance & Internal Changesโ
- CHANGE replace
appendToArray()withArray.concat()for better browser-level optimizations - ADD ensure indexes and primary keys are validated consistently across replication schemas
๐ Plugins Graduating from Betaโ
The following plugins are no longer in beta and are now considered production-ready:
- Replication Appwrite
- Replication Supabase
- Replication MongoDB
- RxStorage MongoDB
- RxStorage Filesystem (Node)
- RxStorage DenoKV
- Attachment replication
- CRDT Plugin
- RxPipeline
You can help!โ
There are many things that can be done by you to improve RxDB:
- Check the BACKLOG for features that would be great to have.
- Check the breaking backlog for breaking changes that must be implemented in the future but where I did not have the time yet.
- Check the todos in the code. There are many small improvements that can be done for performance and build size.
- Review the code and add tests. I am only a single human with a laptop. My code is not perfect and much small improvements can be done when people review the code and help me to clarify undefined behaviors.
- Update the example projects some of them are outdated and need updates.
LinkedInโ
Stay connected with the latest updates and network with professionals in the RxDB community by following RxDB's official LinkedIn page!