Download and save images for offline use of React Native

I am creating an iOS application that, upon user request, will deliver a large JSON file containing image URLs.

How to download these images so that they are available for use by my application, even if it does not have access to Wi-Fi / data?

+4
source share
1 answer

React Native has poor binary data support, you cannot get binary data directly through fetch. However, you can use XMLHttpRequest in branch 0.30 or CameraRoll, see this post .

If you want to save this image data, consider using AsyncStorage .

, , .

react-native-fs

react-native-fetch-blob

+3

Source: https://habr.com/ru/post/1648517/


All Articles