How to force render a component in react
I have this situation..
I am updating a user’s profile picture. The image is stored in the AWS S3 bucket. To prevent unwanted images in the bucket I am using the same image name as before while the user changes his profile picture. So the URL I am getting is also the same as before. But even when I change the state in the redux store with the new URL, (which technically is new but it is the same string as before) react does not display the new image unless I refresh the page. I don’t know whether it is the issue of browser caching or the react behaviour. The image will display if I change the name(URL) to a different one. Since the image src has not changed from the previous state it does not display the new image. How can I tackle this issue?