react stop event propagation code example
Example 1: react supported events
onClick
onContextMenu
onDoubleClick
onDrag
onDragEnd
onDragEnter
onDragExit
onDragLeave
onDragOver
onDragStart
onDrop
onMouseDown
onMouseEnter
onMouseLeave
onMouseMove
onMouseOut
onMouseOver
onMouseUp
Example 2: react event stop propagation
//On SyntheticEvent (parameters from props like onClick)
//e.g. <button onClick={(event) => {...}}>Click Me!</button>
event.stopPropagation()