5 ms·
> IMO the ideal solution some generic right-click (context menu) function/handler. you attach it to each image Ideally, you would only have a single event list
by mifreewil 8y ago
> IMO the ideal solution some generic right-click (context menu) function/handler. you attach it to each image
Ideally, you would only have a single event listener that handles events for all images.
- frosted-flakes 8y agoWith React, it's one and the same thing. React has a single event listener at the top level, then creates synthetic events that it passes down the tree. You can still do native event listeners, but there's no reason to, except for listening for events on `window`, etc.