You’re not able to use node’s fs because it is part of nodejs environment . As you surely know your application code is not running on nodejs but rather directly on your smartphone (besides debug mode but even there you cannot use node’s fs package).
Read moreHow do I create a download button in react native?
// install module npm install react-native-webview // import the module import * as WebBrowser from ‘expo-web-browser’; // then in your function you can call this function await WebBrowser. openBrowserAsync(file_ur); it will open preview of the file and then user can download using share button.14 Haz 2017
Read moreHow do I download a file from react JS?
To download a file with React. js, we can add the download attribute to an anchor element . We just add the download prop to do the download. If we don’t want to use an anchor element, we can also use the file-saver package to download our file.24 May 2021
Read moreHow do I download a PDF from react native?
Follow all the steps carefully:
Read moreHow do I download files from iOS react native?
How to download File in React Native iOS using URL
Read more