react-native-ximage icon indicating copy to clipboard operation
react-native-ximage copied to clipboard

how would you like me to integrate react-native-image-progress?

Open faceyspacey opened this issue 9 years ago • 5 comments

I'm currently using: https://github.com/oblador/react-native-image-progress and I really like your package, and the way you coded it. I wanna make your package optionally offer react-native-image-progress so you can show more than a defaultSource, i.e. animated loaders instead.

Let me know how you imagine it and I'll get on the PR.

faceyspacey avatar Apr 15 '16 23:04 faceyspacey

screen shot 2016-04-16 at 12 14 48 pm Hi faceyspacey,

Does this component work on your app ? what RN version are you using ? My is 0.23.0, it shows blank

return ( <View key={p} style={styles.photoFrame} > <XImage style={imageStyle} url="https://facebook.github.io/react/img/logo_og.png"/> </View> ); ![screen shot 2016-04-16 at 12 14 48 pm](https://cloud.githubusercontent.com/assets/5652798/14578496/09fb420a-03cd-11e6-8d42-1c3e1d3e6f07.png)

pomelio avatar Apr 16 '16 02:04 pomelio

I haven't tested your component, just reviewed the code. I'm using RN 22. The image progress component works here, but I'm not sure about XImage. ...I plan to update my app to the latest RN 24 rc next week.

faceyspacey avatar Apr 16 '16 03:04 faceyspacey

I made this component since I wanted to prefetch the remote images and needed a control on caching. I have deprecated it in ea676926863842e1ac56c29ec238c64a4644fc74.

mohebifar avatar Apr 19 '16 09:04 mohebifar

I can't for the life of me understand what they're doing with their prefetch feature:

http://facebook.github.io/react-native/releases/0.25/docs/image.html#examples

I mean they're showing their prefetched image onLoadEnd of the remote image they're trying to show??? What am I missing? What's the purpose of that?

Also in your commit you state "react-native's Image component does caching"--but are you referring to prior to the "prefetch" features? I.e. has caching always been available? Then what is the "prefetch" stuff for?

From my perspective, the interface I was hoping for was the one you already had--not sure what happens you get the point that you're storing too many images on the phone--but it seemed like the right interface nevertheless.

ps. I'm guessing the purpose is to prefetch an image on a separate page of your app before the user even gets to it--that way when he gets to it, the image uses the cached version (and to do so it uses built-in caching features <Image> as had for a while). Is that the idea?

faceyspacey avatar May 02 '16 10:05 faceyspacey

Hmm, I'm still not sure about it. The thing that is kinda frustrating about the native image component is inconsistency between android and iOS. This prefetch functionality, IMO, requires a default source feature.

Caching is done in native side in addition to prefetching. (Downloadin and storing an image on disk)

mohebifar avatar May 03 '16 05:05 mohebifar