You are viewing a single comment's thread from:

RE: Differences in Defining ES6 Class Methods

in #steemdev6 years ago

This is a good observation that I had never considered, thanks. One of the problems with fat arrows (and even with the class keyword in general) is that it effectively covers up the way that Javascript works fundamentally and makes it look like something different.

It's super important to understand the basics relating to these features (i.e. Object prototypes and the behaviour of this). I strongly recommend to anyone who hasn't already to check out Kyle Simpson's 'You don't know JS`book series which covers both of these topics and many more in careful detail. You're guaranteed to learn a thing or two, and it's free!

Sort:  

Yes, I only came across it because my code didn't work and I had to investigate :D Most people just don't really use OOP in JavaScript / React where binding is needed for the event handlers

Coin Marketplace

STEEM 0.20
TRX 0.13
JST 0.030
BTC 66631.72
ETH 3487.54
USDT 1.00
SBD 2.71