Today I Learned

A Hashrocket project

Ready to join Hashrocket? Find Openings here and apply today.

Cache-control behavior for ReactNative's Image

React Native’s Image component accepts a cache property to override the caching behavior of images, but only on iOS. An interesting setting can force an image to only be loaded if it is in the cache.

    uri: "",
    cache: "only-if-cached"
  style={{ width: 400, height: 400 }}
Looking for help? At Hashrocket, our JavaScript experts launch scalable, performant apps on the Web, Android and iOS. Contact us and find out how we can help you.