Decorator is a simple method of wrapping a code with another. It is also known as a design pattern, extending the functionality of the wrapped code. In JavaScript, decorators have a special syntax. They are prefixed with a @ symbol and placed right before the code we need to decorate.

5m read timeFrom enlear.academy
Post cover image
Table of contents
Introduction to JavaScript DecoratorsIntroduction to JavaScript DecoratorsFunction DecoratorsClass DecoratorsWhy We Need DecoratorsConclusionLearn More
7 Comments

Sort: