dexie-react-hooks
Version:
React hooks for reactive data fetching using Dexie.js
17 lines (12 loc) • 336 B
text/typescript
import Dexie, { Table } from "dexie";
import { Item } from "../models/Item";
export class TestUseLiveQueryDB extends Dexie {
items!: Table<Item, number>;
constructor() {
super("TestUseLiveQuery", {cache: 'immutable'});
this.version(1).stores({
items: "id"
});
}
}
export const db = new TestUseLiveQueryDB();