Closed mutantkeyboard closed 6 years ago
A great point, @mutantkeyboard, and thanks for reporting this ES6-related confusion. Thanks for taking the time to provide an example and reference, too.
That said, my intended audience for the book are beginners — while there are lots of additional subjects to be covered, I made the conscious decision to leave topics for intermediate/advanced developers to others, such as Elijah Meeks, who addresses D3 + ES6, among other topics, in his book.
@alignedleft thank you for the quick response. I will definitely check the Elijah's book. Cheers
Hi @alignedleft
I enjoy the book so far, and thank you so much for updating everything to v4. It's been a life, and time saver.
However, I think it'd be nice if you wrote a couple of examples using newer standards such as ES6/ES7 and use webpack or yarn as a build tools.
I thought it'd be worth mentioning an example here for the future readers that might find themselves confused, and do a small contribution to the community.
Reason for this is the issue with
this
in ES6 module scope , so couple of examples that used3.select(this)
from your book won't work.Example:
With ES6, this example would look like