I'm trying to log
my button's inner text when user clicks on the button, this is what I tried:
function AComponent() {
const logMywords = (e) => {
console.log(e.target.value)
}
return (
<button onClick={logMyWords(e)}>
'my words!'
</button>
)
}