We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
useImage
1 parent b2fdd80 commit 252fc10Copy full SHA for 252fc10
1 file changed
packages/react-native-nitro-image/src/useImage.ts
@@ -37,6 +37,11 @@ export function useImage(source: AsyncImageSource): Result {
37
38
// biome-ignore lint: The dependencies array is a bit hacky.
39
useEffect(() => {
40
+ // clear state each time we will load a new image
41
+ if (image.image || image.error) {
42
+ setImage({ image: undefined, error: undefined });
43
+ }
44
+
45
(async () => {
46
try {
47
// 1. Create the Image/ImageLoader instance
0 commit comments