Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

ReactNative undefined is not an object

I have this error : undefined is not an object (evalueting 'NativeModules["SQLite"][method]')

getAllTests () {
    let DB = null;
    const getDB = SQLite.openDatabase({name: 'database.db', createFromLocation: 1});
    const query = 'select * from tests;';
    return DB.executeSql(query).then(([results]) => {
        return JSON.parse(results.rows.item(0).data || '{}');
    });
}

Comments