title: how to call multiple methods in onClick in react?
body: <p>I have two components (Parent component &amp; Child component) in my react app. I have two button clicks in my child component and I need to pass two props to the parent component. I use the code as follows.
  The problem is, I can't include both methods in the parent component's  element, but I need to. How can I use both edituser and deleteuser functions in the parent component?</p>
  
  <p>Child component:</p>
  
  <pre><code>class EnhancedTable extends React.Component {
    constructor(props){
      super(props);
      this.state = {
        userID: 10
      };
      this.editByUserId = this.sendUserId.bind(this);
      this.DeleteByUserId = this.sendUserId.bind(this);
    }
  
    editByUserId() {
      this.props.onClick(this.state.userID);
    }
  
    DeleteByUserId() {
      this.props.onClick(this.state.userID);
    }
  
    render() {
      return (
         &lt;button onClick={this.sendUserId}&gt;
             &lt;BorderColorIcon onClick={this.editUserById} className="action margin-r" /&gt;
             &lt;DeleteIcon onClick={this.deleteUserById} className="action margin-r" /&gt;
         &lt;/button&gt;
      )
    }
  }
  </code></pre>
  
  <p>Parent component:</p>
  
  <pre><code>Import EnhancedTable from './EnhancedTable';
  
  class Users extends Component {
  
    constructor(props) {
      super(props);
      this.state = {
        userID: null
      };
      this.editUser = this.editUser.bind(this);
      this.deleteUser = this.deleteUser.bind(this);
     }
  
    editUser(idd) {
      this.setState({
        userID : idd
      })
      console.log("User Edited");
    }
  
     deleteUser(idd) {
        this.setState({
          userID : idd
        })
        console.log("User Deleted");
      }
  
    render() {
       return(
           &lt;EnhancedTable onClick = {(e)=&gt;{this.editUser; this.deleteUser;}}/&gt;
       )
     }
  }
  </code></pre>