SyntheticEvent

The event object React passes to your handlers, a wrapper around the browser native event that behaves the same in every browser.

In more detail

It has the familiar fields and methods such as type, target, stopPropagation and preventDefault, and exposes the original browser event as nativeEvent. Since React 17 the object is no longer reused between events, so you can keep a reference to it safely.

Example

A click inside a portal still bubbles to handlers on the component that rendered the portal, because React bubbles synthetic events along the component tree.

Related terms

Taught in

References