How to put a Function Arrow in on onclik

Asked

Viewed 31 times

0

How do I place an Arrow function in an onClik since it is named after the variable?

The following is an example of:

foto da minha função

1 answer

1

You can put normally in onClick

const log = () => {
  alert('debug')
}
<button onClick="log()">LOG</button>

  • thank you very much, it helped a lot.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.