DEV Community

Andi
Andi

Posted on • Edited on

Event

Contoh penggunaan event di react.

function App() {

  const onClickAction = () => {
   console.log('clicked')
  }

  return(
   <div>
    <button onClick={onClickAction}>click me</button>
   </div>
  )

}
Enter fullscreen mode Exit fullscreen mode

Top comments (0)