Closed MS0015 closed 2 months ago
Can you provide a reproducer with the urls? If you want to use urlCache
, make sure the response of the url has cache-control
. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control
I modified the code in SuccessScreen, but I cannot reproduce the issue. The url request is only called once. To me, I did not see flicker. Is this the correct way to reproduce it?
import { StyleSheet } from 'react-native';
import React from 'react';
import TurboImage from 'react-native-turbo-image';
const SuccessScreen = () => {
return (
<TurboImage
source={{
uri: 'https://lyrak.fra1.cdn.digitaloceanspaces.com/icons/add-circle.png',
}}
tint="gray"
style={styles.image}
resizeMode="contain"
/>
);
};
export default SuccessScreen;
const styles = StyleSheet.create({
image: {
width: 300,
height: 300,
},
});
https://github.com/user-attachments/assets/3a8d7d46-7802-40b0-abc9-529858222db3
@MS0015
Can you provide a reproducer?
closing it since cannot reproduce it.
What's happening?
When I open the app and load the image using a remote URL, I want the image to cache. However, when I kill the app and reopen it, it still shows a gray box instead of the image. In the production build, it flickers with a black box.
Reproduceable Code
Relevant log output
Device
iPhone xs
TurboImage Version
1.17.2
Can you reproduce this issue in the TurboImage Example app?
No, I cannot reproduce the issue in the Example app