Handling Events
Handlers are camelCase props that receive a synthetic event.
Example
function Form() {
function handle(e) {
e.preventDefault();
console.log("sent");
}
return <form onSubmit={handle}><button>Go</button></form>;
}Exercise
Stop default.
e.()
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.