Design Patterns In TypeScript — Observer

How to define and maintain dependencies between objects

Photo made with Canva.

Also known as Dependents or Publish-Subscribe, the Observer pattern helps us create decoupled components and modules. It improves the testability, composition, and scalability of our applications. In this post, I’m going to show you some concepts around the Observer pattern, how it works, and a…