React Native apps ઘણીવાર ડેટાને સ્થાનિક રીતે સંગ્રહ કરવાની જરૂરિયાત ધરાવે છે — વપરાશકર્તાની પસંદગીઓ, કેશ્ડ ડેટા, auth tokens, offline content. વિકલ્પોમાં AsyncStorage (key-value), MMKV (ઝડપી), SQLite, અને secure storage સંવેદનશીલ ડેટા માટે શામેલ છે. યોગ્ય વિકલ્પ પસંદ કરવો મહત્વપૂર્ણ છે.
સ્થાનિક સંગ્રહ વિકલ્પો
ASYNCSTORAGE → simple async KEY-VALUE storage (the common basic option):
→ store strings (serialize objects to JSON); for settings, small data, simple caching
→ async API; persists across app launches
MMKV → a very FAST key-value storage (by WeChat) — faster than AsyncStorage, synchronous;
popular modern choice for performance
SQLITE (e.g. expo-sqlite, react-native-sqlite, WatermelonDB) → relational DATABASE for
STRUCTURED/large data, queries, relationships, offline-first apps
SECURE STORAGE → expo-secure-store / react-native-keychain for SENSITIVE data (tokens,
credentials) — ENCRYPTED (keychain/keystore)
