- Aug 2023
-
dev.to dev.to
-
dexie.org dexie.org
Tags
Annotators
URL
-
- Dec 2022
-
dexie.org dexie.org
-
```js import React from "react"; import Dexie from "dexie"; import { useLiveQuery } from "dexie-react-hooks"; import { db } from "./db";
// // React component // export function OldFriendsList() { const friends = useLiveQuery( () => db.friends .where('age') .above(75) .toArray() );
if (!friends) return null; // Still loading.
return
-
{ friends.map(friend =>
- {friend.name}, {friend.age} ) }
-
-
codepen.io codepen.io
Tags
Annotators
URL
-
- Nov 2022
-
gist.github.com gist.github.com
-
Intended use - store a database in a Tampermonkey storage in order to access cross sites.
-
- Aug 2022
-
www.codeproject.com www.codeproject.com
-
stackblitz.com stackblitz.com
Tags
Annotators
URL
-
-
gist.github.com gist.github.com
-
golb.hplar.ch golb.hplar.ch
Tags
Annotators
URL
-
-
golb.hplar.ch golb.hplar.ch
- Jul 2022
-
dexie.org dexie.org
-
stackoverflow.com stackoverflow.com
-
```js const dbName = 'CustomPeople';
const exists = await Dexie.exists(dbName);
if (exists) { var db = new Dexie(dbName); const dynamicDB = await db.open(); const existingVersionNumber = dynamicDB.verno; const columns = await ExternalDBService.getColumns(); db.close(); db = new Dexie(dbName); db.version(existingVersionNumber).stores({ People: columns }); return db.open(); } else { db = new Dexie(dbName); db.version(1).stores({ People: [] }); db.open(); } ```
-
-
dexie.org dexie.org
-