TypeScript's configuration of IndexedDB
9 / 11 / 2022
- database
- indexeddb
- react
- typescript
A quick description from Javascript.info on what IndexedDB is.
IndexedDB is a database that is built into a browser, much more powerful than
localStorage
.
Stores almost any kind of values by keys, multiple key types.
Supports transactions for reliability.
Supports key range queries, indexes.
Can store much bigger volumes of data than
localStorage
.That power is usually excessive for traditional client-server apps. IndexedDB is intended for offline apps, to be combined with ServiceWorkers and other technologies.
As confirmed by virtually everyone, the API of IndexdDB is difficult to manage for most people, although in TypeScript it could be worse.
For this, I created a repository with a standard IndexedDB configuration in TypeScript. I hope to help someone.
The repository 🫡
If you appreciated the article, give it a like on dev.to.