簡體   English   中英

如何在 expo 中使用 sqlite 文件反應原生

[英]How to use sqlite file in expo react native

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這樣做我發現是 react-native-sqlite-storage 但我得到了這個像導入一樣的錯誤

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   

如果您的項目使用 expo ,您可以使用Expo-SQLite ,它易於安裝和使用。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM