React natif créer un fichier texte

var RNFS = require('react-native-fs');

var path = `${abolute_path_to_file}/file_name.txt`;

// write the file
try {
	await RNFS.writeFile(absolute_path, 'text content to write to file...', 'utf8');
} catch(e) {
  console.log('Error in writing to text file');
}
amit.bhagat