Practice
< button onclick = ' activLasers () ' >
whereas React follows the CamelCase convention :
< button onClick = { activLasers } >
< a href = ' # ' onclick = 'console.log ("The link was clicked.");
return false
; ' />
whereas in React you have to call
function handleClick(event) {
event.preventDefault()
console.log('The link was clicked.')
}
Comments