How does React handle event delegation and why does it differ from traditional DOM event delegation?

React Developer Hard

React Developer — Hard

How does React handle event delegation and why does it differ from traditional DOM event delegation?

Key points

  • React improves memory efficiency by using a single event listener
  • Synthetic events are dispatched to component handlers
  • Traditional DOM event delegation involves attaching individual listeners to each node
  • React's approach reduces the number of event listeners in the DOM

Ready to go further?

Related questions