A minimal guide to ECMAScript Decorators (and Property Descriptors)

Very insightful piece by Uday Hiwarale on ES Decorators (Class Method Decorators, Class Instance Field Decorators, and Class Decorators).

Right now (June 2018), Decorators are in stage 2 and we have Babel plugin to transpile decorators babel-plugin-transform-decorators-legacy. In stage 2, as syntax of the feature is subjected to change, it’s not recommended to use it in production as of now. In any case, decorators are beautiful and very useful to achieve things quicker.

Before going into Decorators he gives a very insightful explanation about Property Descriptors first:

To understand decorators, we need to first understand what is a property descriptor of JavaScript object property.

A minimal guide to ECMAScript Decorators (and Property Descriptors) →

Elsewhere , ,

One Response to A minimal guide to ECMAScript Decorators (and Property Descriptors)

  1. Pingback: JavaScript engine fundamentals: Shapes and Inline Caches | Bram.us

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.