简体   繁体   中英

Importing fs in react-native

I'm trying to import TinyDB in an expo project but I need help with fs, because expo doen't allow fs as it is a third-party file system.

I try using react-native-fs but I don´t kow how to use it. Can someone help me?

This is my Code:

var TinyDB = require('tinydb');
var db = new TinyDB('../UserData.json');

Uninstall react-native-fs and use expo-file-system instead

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2025 STACKOOM.COM