Skip to content

Instantly share code, notes, and snippets.

@infinitbility
Created March 29, 2020 19:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save infinitbility/78a6d6351f068c6e319e9dfca0d0c971 to your computer and use it in GitHub Desktop.
Save infinitbility/78a6d6351f068c6e319e9dfca0d0c971 to your computer and use it in GitHub Desktop.
React Native SQLite Storage
// 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