Answers for "react js onclick call two functions"

3

react js onclick call two functions

<a href="#" onClick={() => { func1(); func2();}}>Test Link</a>
Posted by: Guest on November-26-2020
1

onclick multiple functions react

class Test extends React.Component {
   onClick(event) {
      func1();
      func2();
   }
   render() {
      return (
         <a href="#" onClick={this.onClick}>Test Link</a>
      );
   }
}
Posted by: Guest on June-08-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language