wcandillon / react-native-img-cache

Image Cache for React Native
https://hackernoon.com/image-caching-in-react-native-96d8df33ca84
Apache License 2.0
732 stars 142 forks source link

CachedImageBackground -- ImageBackground not available on RN 0.45 #94

Open peacechen opened 6 years ago

peacechen commented 6 years ago

ImageBackground was introduced in RN 0.46 and is unavailable in RN 0.45 or prior. I can use CachedImage for now, but it outputs a warning message which is inconvenient (and falsely alarms testers). Would you be open to a PR that conditionally outputs the warning based on RN version?

ImageBackground not present in RN 0.45

mienaikoe commented 6 years ago

On RN 0.55, this throws an exception. Could really use a CachedImageBackground

simonbuerger commented 6 years ago

I've just switched to using CustomCahcedImage

<CustomCachedImage source={{ uri: 'https://some/image/source' }} component={ImageBackground}><Text>Some text</Text></CustomCachedImage>