I am trying to to call "preventDefault" in some manner on a custom component without success. Here are my attempts. The first attempt with "e" passes the element reference and not the actual event. The second method passes the event, but the prevent default method does not prevent anything. What is the best way to do this?
<MyComponent header= {
<div onClick={e => { e.preventDefault(); myFunction.bind(this, event) }}>
Header
</div>
} />
function myFunction(event) {
event.preventDefault();
}