dillon1000/react

Commit

re-trigger load events for img elements on commit (#23316)

early load events will be missed by onLoad handlers if they trigger before the tree is committed
to avoid this we reset the src property on the img element to cause the browser to re-load
the img.

Co-authored-by: Josh Story <[email protected]>
Browse files
Changed paths2 files
First-parent comparison
A packages/react-dom/src/__tests__/ReactDOMImageLoad-test.internal.js AddedM packages/react-dom/src/client/ReactDOMHostConfig.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…