Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
janci
· 9y ago · 0 comments
Better yet element.addEventListener("click", self.handleClick.bind(this))
Comments
[–]
rayshan
9y ago
This is less performant, because bind creates a new function with new context. At the framework level, bind is avoided at all costs.
[–]
janci
OP
9y ago
The overhead is not important, if you bind once. It becomes problem, if you do it too often, like in react render function.