Skip to content
Justice Tech School

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

How are event props named?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.