Event Emitter

Like EventEmitter in Node.js, we can create a simple EventEmitter to implement a publish-subscribe pattern. Just like using addEventListener in the browser.

Today's weather is Sunny

Choose Weather:

City

Go to work

Ship

Go fishing