wcandillon / react-native-expo-image-cache

React Native Image Cache and Progressive Loading based on Expo
MIT License
668 stars 125 forks source link

Remove expo dependency #7

Open brunolemos opened 6 years ago

brunolemos commented 6 years ago

Why not extract only the parts used?

I see it only uses BlurView and FileSystem.

AFAIK, BlurView was based on https://github.com/react-native-community/react-native-blur and for FileSystem https://github.com/itinance/react-native-fs should do the job.

wcandillon commented 6 years ago

Yes that's good idea 👍🏻.

wcandillon commented 6 years ago

From my experience with RNFetchBlob, it is difficult to guarantee the same behaviour for each function. For instance it is possible that downloading a file with react-native-fs is quite different from expo Filesystem.

Noitidart commented 6 years ago

Also looking for a non-expo version. Thanks for your awesome work!

I had a question:

I making an Android app. I have a flat list, and currently I just use straight <Image source={{ uri:'REMOTE URL HERE' }} /> and I notice on Androdi it fades it. Is it loading it new every time? As I scroll ,even in a flat list, the perf is janky. I don't notice this on iOS. Is there a way to fix this. To emphasize this, we can use <ScrollView> and create just 20 <Image> with same URI and even though same image, the scroll view scrolling is extremely janky.

wcandillon commented 6 years ago

@Noitidart by "loading", you mean loading from the network? The fade effect on Android happens even if the image is local.

Noitidart commented 6 years ago

Thanks @wcandillon very much for your reply!

Oh is there a way to disable that fade?

Do you know why its causing scroll to be janky, if <FlatList> with just 10 rows of 10 images shown at size 200x200? (<ScrollView> also has janky on scroll, but its so few items im so confused) (images are from 2mb - 6mb) (i havent tested production build yet, this is in dev build but very clean build not advanced project, very small)

Noitidart commented 6 years ago

I found how how to disable fade in android - https://stackoverflow.com/questions/40420091/how-to-disable-image-fade-in-effect-in-react-native - undocumented fadeDuration prop.

Lxxyx commented 6 years ago

Expo SDK is huge for me. Support no expo version may be good

jariwalabhavesh commented 6 years ago

It would be helpful to have component without expo dependency

amitbravo commented 6 years ago

can we use it without expo today ?

duranmla commented 6 years ago

Not yet, I just tried. 👎

abeltje1 commented 5 years ago

@wcandillon, I saw you mentioning the problems with RNFetchBlob. Did you know there is a new RNFetchBlob library, which is actively maintained & works (at least in my project). Would this development make it possible to remove the expo depedency?

here it is: https://github.com/joltup/rn-fetch-blob

4levels commented 5 years ago

Since this library seems to be ment especially for Expo, I think this is not an Issue and should be closed IMHO. Instructions on how to use this without Expo would be a nice to have though