Hacker News new | ask | show | jobs
by matthewmacleod 2724 days ago
Have you looked at using arrow functions in class properties for this? They have some issues, but avoid all the tedious manual binding.

Alternatively, the autobind decorator could help - though I’ve never used that myself.

1 comments

I've used Autobind a great deal as of recent with React classes, it's been both pleasant to use and I've yet to experience any issues with it.