DEV Community

Discussion on: What is an event emmitter?

Collapse
 
augustocb23 profile image
Augusto César • Edited

It's a part of the Observer design pattern. A Subject (or Event Emitter) emits events to its subscribers, and this subscribers can do something when this event occurs.

There are several implementations of this pattern. RxJS is a famous implementation for Javascript/Typescript, used by React and Angular.
In C# there's a native implementation that uses the EventHandler class.

en.m.wikipedia.org/wiki/Observer_p...

Collapse
 
dragosnedelcu profile image
Dragos Nedelcu

Fantastic add, thanks for the Wikipedia link and the implementation agnostic answer.

A quick tip: "his" => "its"
hehe no need for gender on this one :)

Collapse
 
augustocb23 profile image
Augusto César

Ops 😬
Corrected