...

/

Differences Between the React Event Handlers and the Native Event

Differences Between the React Event Handlers and the Native Event

Learn about the changes introduced in React event handlers and how they differ from the native event API.

Defining events

React and JSX events resemble HTML attribute definitions. But there are differences. Events in React are defined with camelCase instead of lowercase, for example:

  • onclick is changed to onClick
  • onmouseover is now defined by onMouseOver
  • ontouchstart would be
...