New Stable Packages
- dexie@4.2.0
- y-dexie@4.2.0
- dexie-react-hooks@4.2.0
- dexie-cloud-addon@4.2.0
What's Changed since Latest Stable (dexie@4.0.11)
- New add-on "y-dexie" that integrates the powerful Y.js library with dexie.
- Support "y-dexie" and Y.js in dexie-cloud-addon
- New hook
useDocument()
in dexie-react-hooks for Y.js integration. - Fix Named Export 'Dexie' Not Found in Production with Vite/Vinxi by @thijssmudde in #2155
- fix: 'Dexie' Not Found in Production with Vite/Vinxi dexie-react-hooks by @Contraboi in #2162
New Contributors
- @thijssmudde made their first contribution in #2155
- @davbl made their first contribution in #2165
- @Contraboi made their first contribution in #2162
Migration from 4.1.x-beta
Dexie 4.1.x has been tagged @next
and contained experimental Y.js support. The Y.js support has since been moved into its own add-on 'y-dexie'.
If the built-in Y.js support in dexie@4.1.x has been used, a migration is needed:
npm install y-dexie
- Instead of
import { DexieYProvider } from 'dexie'
-->import { DexieYProvider } from 'y-dexie'
- Instead of
DexieyYProvider<Y.Doc>
-->DexieYProvider
. - No need to pass
Y
to Dexie constructor, but instead, pass theyDexie
addon:With dexieCloud addon, make sure to pass yDexie first:import yDexie from 'y-dexie'; ... const db = new Dexie('foo', { addons: [yDexie] });
{ addons: [yDexie, dexieCloud] }
- Declare Y.Doc properties as
prop:Y.Doc
instead of justprop:Y
db.version(1).stores({ friends: ` ++id, name, age, friendNotes: Y.Doc` // where friendNotes holds the Y.Doc instance });
If you need a sample PR of these changes, have a look at dexie/dexie-cloud-starter#8
Full Changelog: b415d92...a978fc0