Created
March 29, 2020 19:12
-
-
Save infinitbility/78a6d6351f068c6e319e9dfca0d0c971 to your computer and use it in GitHub Desktop.
React Native SQLite Storage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add this code on your app.js | |
import SQLite from 'react-native-sqlite-storage'; | |
global.db = SQLite.openDatabase( | |
{ | |
name: 'SQLite', | |
location: 'default', | |
createFromLocation: '~SQLite.db', | |
}, | |
() => { }, | |
error => { | |
console.log("ERROR: " + error); | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment