6 ms·
The biggest problem IMO with JS and performance is event listeners. If they setup event listeners on each card, talk, etc. it could easily kill performance. T
by everdev 7y ago
The biggest problem IMO with JS and performance is event listeners.
If they setup event listeners on each card, talk, etc. it could easily kill performance.
Turns out this is easily solved by setting up a single event listener on the root element (body, #app, etc.) and then checking the event.target to see what changed.
- baddox 7y agoReact does this, both for performance and to normalize event behavior across browsers.