Events

React onClick

Supply a callback for click activation on a native control.

Formal Syntax & Structure

react syntaxreact
onClick={handleClick}

Working Example

Example Snippetreact
function MapButton() { return <button type="button" onClick={() => console.log("Map")}>Map</button>; }
React Reference