Variable de estado: -
const [picture, setPicture] = useState(null);Supongamos que la imagen = "123" después de actualizar la imagen tiene el mismo valor "123". Entonces, mi pregunta es cómo recargar la imagen.
<Image src={profileurl + picture} alt="profile" title="profile" width="100" height="100" />Espero que esta función sea útil. Gracias
const reloadImg = url => { fetch(url, {cache: 'reload', mode: 'no-cors'}) .then(() => document.body.querySelectorAll(`img[src='${url}']`).forEach(img => (img.src = url))) .catch(e => console.log('error', e)); };