React Native has poor support to binary data, you are not be able to get the binary data directly via fetch
. However you can use XMLHttpRequest in 0.30 branch or CameraRoll
, refer to this post.
If you want to persist those image data, consider use AsyncStorage.
There're also several open source modules help you deal with file access if you want to store the images in file system.
react-native-fs
react-native-fetch-blob
NOTE: react-native-fetch-blob has been discontinued. rn-fetch-blob is a fork of it that is still maintained. When using npm, don't include react-native-fetch-blob but rn-fetch-blob instead.