Observer pattern
medium 50 minDecouple a state-holding subject from its dependents: they register, and the subject notifies everyone on its list when something changes.
Decouple a state-holding subject from its dependents: they register, and the subject notifies everyone on its list when something changes.