JavaScript Design Patterns - Structural - Decorator
Decorator is a structural design pattern that allows us to attach new behaviors to objects by placing them inside special wrapper objects containing them.
In the example below, we use a decorator to extend behavior in Facebook Notifications.
class No...
nhannguyen.hashnode.dev1 min read