I'm trying to use react-native-fs in my app to upload files etc. I followed the installation like the documentation, make the import and i'd put this code for the test :
componentDidMount(){
const path = RNFS.DocumentDirectoryPath + '/test.txt';
console.log(path);
// write the file
RNFS.writeFile(path, 'Lorem ipsum dolor sit amet', 'utf8')
.then((success) => {
console.log('FILE WRITTEN!');
})
.catch((err) => {
console.log(err.message);
});
}
And it's directly render me this error :
ps: I created my project via create-react-native-app
any ideas?