News for hackers. Stuff that matters.
Re:Making SetInterval Declarative with React Hooks by mifreewil on Monday February 04, 2019 @02:07AM (#19074493)
> 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.

Re:Making SetInterval Declarative with React Hooks by frosted-flakes on Wednesday February 06, 2019 @01:48AM (#19093226)
With 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.