Closed Bernard996 closed 2 years ago
I am presuming https://reactnative.dev/docs/image . From what I can tell, there is no built in reload from file api. You could try:
<Image />
(conditionally render null)<Image />
Or:
<Image />
source to target some placeholder/blank file<Image />
source back to the original targetThe thing is, react native is designed to mimic how interactions work on websites. When loading an image from a specific path, browsers tend to assume the same uri always yields the same image. I would recommend considering your app design, to see if it really is necessary to use the same name, or if using a unique name per image can work.
Got it, thank you
I'm trying to updating or deleting an image dynamically based on user preferences, but the name must be the same. So, if I try ti use unlink, for exsample, to delete the image, the Image component keeps displaying it till I close and reopen the app. Same if I change the image but keep the name. Is there a way to make it work? Even updating the states doesn't work