Consider a react/redux application with react-bootstrap components.
This may be a very rookie question, but I am trying to pass multiple actions to a single onClick event on a Button from a react-bootstrap library.
<Button bsStyle="success" bsSize="small" onClick={someCallback; someOtherCallback;}> Something </Button>
How to do this properly?
Advertisement
Answer
Wrap them in another function:
<Button bsStyle="success" bsSize="small" onClick={onButtonClick}> Something </Button> ... onButtonClick = function(event){ someCallback() someOtherCallback() }