React uses event delegation as stated in the documentation here :
Event delegation: React does not actually attach event handlers to the nodes themselves. When React launches, it starts listening for all events at the top level with a single event listener. When a component is mounted or unmounted, event handlers are simply added or removed from the internal mapping.
I have a very common scenario when I have a list of elements and I want an event handler for each element, should I use my custom event delegation and access the target element from the event object to execute logic, or should I attach a separate event listener callbacks for each item in the list and rely on React to take care of performance.
source
share