In my component I have used an image in the following manner:
<div className="margin-10 flex-row-center">
<span>
<img src={spinner} className="spinner" />
</span>
<span className="padding-10">
We are checking your details
</span>
</div>
This is a few lines from a big functional component that has many states in it. This component is also sometimes used as a child to other components.
Now, whenever a state gets updated, a re-render of the component happens. Natural.
However, a visual update on the image is visible, which is not a good UX.
Any help, on how to prevent such unnecessary re-rendering of images. Also, if there is any other way to use images in React, that could solve this problem, will be helpful.