Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

will preload function check cache before hit image url? #954

Unanswered
naveenprakash74 asked this question in Q&A
Discussion options

my code Exaple:

const OptimizedImage = ({ imageUrl, ...restProps }) => {
 useEffect(() => {
 (async () => {
 await FastImage.preload([
 {
 uri: imageUrl
 },
 ]);
 })();
 }, []);
 return (
 <FastImage
 source={{ uri: optimizedImageUrl, priority: FastImage.priority.high }}
 {...restProps}
 />)

and My question is
Supposed User open app first time preload function will run on componentmout and render image will run.
What happened if user kill this app and reopen it will Preload function check the in cache the url already exist or it will fetch new image and overwrite previous cache?

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /