Event handler
An event handler is a registered callback, object, or component that responds to a specified event when it occurs.
Clean Applications with Hexagonal Architecture
A component that reacts to a published event by invoking additional behavior.
- How it is used
- Separates secondary reactions from a primary use case by invoking additional use cases when domain events are published.
- How deep it goes
- Explains event generation, publication, listener boundaries, transaction timing, and ordering limits; distinguishes local handling from broader delivery concerns.
- Examples
- Uses article publication to trigger subscriber notifications, statistics, and analytics, with a notification command dispatched through a command bus.
- What you can do after
- Operate/configure listeners with Spring’s transactional event handling to choose whether secondary failures can roll back the primary operation.
Read how Clean Applications with Hexagonal Architecture explains event handler →
React Quickly, Second Edition
A React event handler is a callback registered through React that React invokes when a specified event occurs for a React-managed node.
- How it is used
- Handles specified events on React-managed nodes through callbacks registered in JSX.
- How deep it goes
- Explains dispatch, custom event objects, shared listeners, performance, and consistency, but stops short of handler implementation details.
- Examples
- Uses JSX nodes, button collections, document-level listeners, and a comparison between React and native DOM handling.
- What you can do after
- Understand how React registers, dispatches, and scales event callbacks without individual DOM listeners.
Read how React Quickly, Second Edition explains event handler →
Also covered in
Related concepts
- driving adapterkind of · A driving adapter receives input from an external actor or system, translates it into application terms, and invokes an application input port.
- synthetic eventuses · A synthetic event is a framework-provided event object that describes an occurrence and exposes related properties to an event handler.
- event streamuses · An event stream is an ordered sequence of events produced over time and made available for consumption or processing.
- location.hashuses · The Location.hash property gets or sets the fragment identifier of a URL.
Questions about event handler
What is event handler?
An event handler is a registered callback, object, or component that responds to a specified event when it occurs.
Which Manning books explain event handler?
Clean Applications with Hexagonal Architecture and React Quickly, Second Edition.
What is event handler a kind of?
Event handler is a kind of driving adapter. A driving adapter receives input from an external actor or system, translates it into application terms, and invokes an application input port.
What is event handler also called?
Event handler is also called listener.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

