Comment by rajatkulk

2 years ago

I'm a bit naive here, so asking a stupid question. I have an `offline only` app where I read things from the file system (markdown) and currently store them in a redux state for accessing filepaths and ids.

I've been planning to move to indexedDb using dexie for kinda the same use case of easier transaction, not maintaining a huge redux state (16k lines or so), and improved performance.

Now if my app is not supposed to be backed by a online database (single player only, complete offline), would instant make sense for this?

or would indexedDB be the safer choice?

I would not recommend using IndexedDB as your primary storage. This is because browsers can sometimes delete the underlying store (there are various reasons for this, but one is that the user is running out of space on their machines) [1]

If you have access to the file system, I would consider using SQLLite to store everything. If you end up then wanting auth / collaboration, you could try Instant.

[1] This is a good comment that goes deeper https://news.ycombinator.com/item?id=28158407

  • Ooo nice read! Since I use tauri, mac would have the browser as safari, and since it's a purely offline app, losing that is disastrous!

    I'll move over to SQLite in that case, since that can atleast be persisted! Thanks!