Pyae Phyoe Shein
Pyae Phyoe Shein

Reputation: 13827

Storage in React Native

I'm about to develop offline dictionary app with React Native. But I'm not sure which storage is the best in React Native between SQLite & AsyncStorage. As I read some online documentation and tutorials, when I use SQLite I must need to configure SQLite library in each app iOS and android. And when I look through AsyncStorage not sure it can be handle or not million records inside it. That's why I like to know which one should I use between SQLite & AsyncStorage or some cool library out there for React Native?

Upvotes: 1

Views: 559

Answers (1)

M Reza
M Reza

Reputation: 19708

For that case, I recommend using Realm. It is simply much faster than AsyncStorage and SQLite. Read this and this for more info.

AsyncStorage has slow runtime and has no indexing capabilities. It accepts only strings as its value and you need to serialize data before inserting and deserialize when reading. So it's not good for large amount of data. It also has 6MB limitation for Android devices.

Upvotes: 1

Related Questions