Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react handling event

handleClick = event => event.target.classList.add('click-state');

render() {
  return <div className="base-state" onClick={this.handleClick}>Click here</div>;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #react #handling #event
ADD COMMENT
Topic
Name
2+1 =