Hacker News new | ask | show | jobs
by nitwit005 3966 days ago
The usual problem with this kind of thing is actually events. The modifications may, or may not, add elements that need listeners attached to them. It looks like as this is now, after any update you'd have to query all such elements and see if they need a listener attached.

React has its own "Event System" to try to deal with that issue.

1 comments

Using event delegation makes that a non issue.
Sort of. You'd have to listen at the top level of wherever you're using this, so you'll have to write your own mini event library to figure out which component got clicked on, and grab any associated data.