DOM events
onMouseLeave
Observe departure from a region rather than every transition between its descendants. Hover state is supplemental to keyboard and touch interaction.
Formal Syntax & Structure
react syntaxreact
onMouseLeave={handler}Working Example
Example Snippetreact
export default function App(){return <section onMouseLeave={()=>console.log('Left')}><p>Stock</p><p>Four units</p></section>}