DEV Community

Discussion on: The Proper Way to Write Async Constructors in JavaScript

Collapse
 
yw662 profile image
yw662

have been using the private constructor approach, but there are some occasions you would need a real async constructor, exp., a custom element.

Collapse
 
dandv profile image
Dan Dascalescu

Yep. And it's easy to use an async constructor.

Collapse
 
yw662 profile image
yw662

But a custom element is where you need to super().

Collapse
 
benjamindasilva profile image
BenjaminDaSilva • Edited

For F*cks sake Dan,

get over it, you don't have to comment a gazillion times "BUT MY SOLUTION IS BETTER!" ...

Arguments have been exchanged, let the readers decide for themselves....