Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

image onclick function react

  const imageClick = () => {
    console.log('Click');
  }
  
  return (
     <div>
        <img src={require('/myfolder/myimage.png')} onClick={() => imageClick()} />
     </div>
  );
 
PREVIOUS NEXT
Tagged: #image #onclick #function #react
ADD COMMENT
Topic
Name
2+7 =