top | item 37975778

(no title)

stupidcar | 2 years ago

There are also getter (and setter) properties that can be backed by private fields:

get name() { return this.#name; }

Half of this article seems to be based on the author’s unawareness of JS class syntax.

discuss

order

moritzwarhier|2 years ago

The optimization points are good to keep in mind, no?

See for example:

https://github.com/rollup/rollup/issues/349

I think it is good to know that there is no tree shaking for class methods, even when public.

This is a valid consideration IMO.

The missing minification of identifiers and properties of the Vue instance in general were always bugging me in Vue 2, even when not using the class keyword.