Hacker News new | ask | show | jobs
by joshribakoff 3087 days ago
well the alternatives I know of were to call .bind(this) all over the place, or wrap your handlers in a fat arrow wrapper function which is also an anonymous function as you say. I think this is the nicer of the options, and Vue.js is similar but you provide a hash of functions keyed by name, which is basically the same thing just different syntax. This nice thing about React is it doesn't matter. You can just write functional components if you don't want the es6 class stuff.