How can I access local database on react native?

Updated answer: there’s now a fledgling SQLite wrapper available:

https://github.com/andpor/react-native-sqlite-storage

Previously:

This comment on Hacker News indicates that there’s nothing available right now:

There is currently no native module for SQLite, but you can build one
if you want. 😀
http://facebook.github.io/react-native/docs/nativemodulesios.html

We use a key-value store for most of our client-side persistence:
http://facebook.github.io/react-native/docs/asyncstorage.html

It’s by Eric Vicenti who seems to work at Facebook and contribute to React Native, so pretty authoritative.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)