codingtcher.com
Theme Night
Home
Login

img onclick react

Home » Tutorial Post » img onclick react

image onclick function react

  const imageClick = () => {
    console.log('Click');
  }
  
  return (
     <div>
        <img src={require('/myfolder/myimage.png')} onClick={() => imageClick()} />
     </div>
  );

image onclick react

  const imageClick = () => {
    console.log('Click');
  }
  
  return (
     <div>
        <img src={require('/myfolder/myimage.png')} onClick={() => imageClick()} />
     </div>
  );


image onclick react

    const imageClick = () => {
      console.log('Click');
    }

	return (
           <div>
              <img src={require('/myfolder/myimage.png')} onClick={() => imageClick()} />
           </div>
        );

Related Post