2

am using expo 0.62 i have a project to take one else project an android studio java project and convert it into react native project he uses database as database.sqlite i want to know if it is possible for me to get data from that file the packages to do that i found were react-native-sqlite-storage but i get error for this like imported like

import {openDatabase} from 'react-native-sqlite-storage';
const db = openDatabase({name:'database.sqlite'});
export const getStories = props => {
    
    console.log(db);
};```
 

```TypeError: null is not an object (evaluating 'NativeModules["SQLite"][method]')```

does it mean i can't use it in expo and have to eject can anyone tell me to get data from .sqlite format file in expo   
Cristo Ferrao
  • 83
  • 1
  • 11
  • I got same error with `react-native-sqlite-storage + expo`. Can't open database. But no error with `expo-sqlite`. – Four May 31 '22 at 02:23

1 Answers1

2

If you use expo for your project, you can use Expo-SQLite, it's easy to install and using.

Anthony
  • 499
  • 4
  • 10
  • its ok now got annoyed by it since it was only small data so i import it to local database and exported it as json now can access just had to make few changes but i don't think it will cause problems thanks for responding – Cristo Ferrao Jul 03 '20 at 11:17