DOM events
onLoad
Observe completion of an element resource load, not completion of all page work. React may propagate resource events that native DOM does not bubble.
Formal Syntax & Structure
react syntaxreact
onLoad={handler}Working Example
Example Snippetreact
export default function App({src}){return <img src={src} alt='Tool' onLoad={e=>console.log(e.currentTarget.naturalWidth)}/>}