EventBoundary

Provide a boundary that will stop propogation of specified events.

parent click
<div onClick={() => console.log('parent click')}>
    <Border>
      parent click
      <EventBoundary onClick={() => console.log('child click')}>
        {bind => (
          <button {...bind} data-test="childButton">
            child click
          
        )}
      </EventBoundary>
    </Border>
  </div>
</Playground>

API

EventBoundary accepts any prop starting with "on" that is also a function.