paint-brush
How To Cache Images in an Expo Managed React Native App by@wagslane
7,110 reads
7,110 reads

How To Cache Images in an Expo Managed React Native App

by Lane Wagner4mMay 21st, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

React Native only supports caching images on IOS out of the box. CachedImage uses the same props and API as React Native's Image and ImageBackground components. It downloads the image to the user's local. filesystem using the SHA-256 hash of the image. Then, on subsequent renders and app uses, it loads the image from the. filesystem if it exists. This saves the user from using unnecessary data and experiencing slow load times. In order to bust the cache, you can append a query string or anchor text to the. URI.

Company Mentioned

Mention Thumbnail
featured image - How To Cache Images in an Expo Managed React Native App
Lane Wagner HackerNoon profile picture
Lane Wagner

Lane Wagner

@wagslane

Founder of Boot.dev. Whining about coding sins since 2011. Committing coding sins for the same.

About @wagslane
LEARN MORE ABOUT @WAGSLANE'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Lane Wagner HackerNoon profile picture
Lane Wagner@wagslane
Founder of Boot.dev. Whining about coding sins since 2011. Committing coding sins for the same.

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
Also published here