I have a custom button which renders a button like this:
<button>{this.props.text}</button> This button is called ButtonCustom, what I want to do in the render method of the main container is this:
function myFunc1{ doSomething(); } function myFunc2{ doSomething(); } <ButtonCustom text="sometext" onClick={myFunc1}></ButtonCustom> <ButtonCustom text="sometext" onClick={myFunc2}></ButtonCustom> This however isn't working as the button doesn't execute the functions, how could I make it work?