arrow_backBACK TO DRILLS
Black Beltreconciliation-keys

An img Element Keyed by Image Source

An image gallery shows the previous image briefly while the next image loads because the same <img> DOM node is reused. Why does adding key={image.src} to the <img> fix this?

BugDojo
BlogFAQ

© 2026. Carved in code.