7 ms·
I'm happy about the class syntax additions that came with ES6, especially the method definitions. It's increased my productivity (and happiness) when working
by _31 8y ago
I'm happy about the class syntax additions that came with ES6, especially the method definitions. It's increased my productivity (and happiness) when working with js.
- iteriteratedone 8y agoIt has done nothing for my productivity and only makes it more complex of a task for me to make sense of a javascript file.
- nightski 8y agoMy only complaint is having to manually bind methods in the constructor. I understand why it's necessary but it is tedious. I suppose the answer is to just use TypeScript but we are talking about ES6 here.
- matthewmacleod 8y agoHave 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.
- LiquidFlux 8y agoI'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.
- seekbeak 8y agoCan't the majority of that manual binding be done by good 'ol fat arrows?