Closed ZYinMD closed 4 years ago
i've never used localforage and am a newcomer on idb. imo idb is not as intuitive as a traditional key-value storage and for me it takes some time to understand the concept behind indexeddb and to get used to it.
you may not need something as flexible and extensible as idb in your projects but why not leave some rooms for the possibilities in the future.
I wouldn't recommend local forage unless you're dealing with ancient browsers. The code is pretty bloated to handle all that.
However, if you just want a key val store, try https://www.npmjs.com/package/idb-keyval.
Thanks @jakearchibald for your answer! I'll choose idb then.
Would you care to comment a little bit on the original question? (why idb suddenly became popular in mid 2019) Just a little curious ~~
I'm not sure to be honest. I only noticed it last month.
I rewrote the library at the start of the year, which I think gave it a bump in popularity, but I agree that it's probably a dependency of something super popular.
So I'm hoping to choose between
idb
andlocalforage
without actually trying them (I know, don't despise me), and according to npmcharts, idb suddenly got a lot of traction in mid 2019. I wonder if it's because a popular package began depending on it?If the increased number of installs came from end users, then I'd definitely choose
idb
because people obviously loved it.But if the increased number of installs came from being a dependency, then the number of real end users who actually use it may still be far less than
localforage
, and as an end user maybe I should uselocalforage
.Thanks!