IndexedDB API is powerful, but may seem too complicated for simple cases. If you’d prefer a simple API, try libraries such as localForage, dexie.js, … that make IndexedDB more programmer-friendly.
-
- A Minimalistic Wrapper for IndexedDB
- https://dexie.org/
-
$ npm install dexie
-
Read Typescript
- Need to define classes for type convenience.
- The name specified in
// (1)
is exposed in the browser scope, so include a human-readable application name or something similar for clarity. localDB.ts
use.ts
- You can see the contents in Chrome Dev Tool > Application
This page is auto-translated from /nishio/IndexedDB using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I’m very happy to spread my thought to non-Japanese readers.