Events

React event capture

Observe ordinary nested clicks before the target handler using the Capture suffix.

Formal Syntax & Structure

react syntaxreact
onClickCapture={handleCapture}

Working Example

Example Snippetreact
function Trace() { return <div onClickCapture={()=>console.log("capture")}><button type="button" onClick={()=>console.log("button")}>Trace</button></div>; }
React Reference