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   
1
  • I got same error with react-native-sqlite-storage + expo. Can't open database. But no error with expo-sqlite. Commented May 31, 2022 at 2:23

1 Answer 1

2

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

Sign up to request clarification or add additional context in comments.

1 Comment

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.