Quantcast
Channel: Nicolò Pignatelli
Viewing all articles
Browse latest Browse all 10

Javascript event dispatcher

$
0
0

I'm not a full fledged frontend/javascript developer, but I recently had to start using React for a quite complex UI prototype I'm working on. Soon after a few lines of code, I realized that I needed a simple event dispatcher that could allow me to decouple React components by making them just firing events from their closed domains. The weird thing is that an event dispatcher as a javascript library seems to be missing from the open source world, so I made my humble and naive version. I hope it will be useful for someone as a starting point of his/her code: https://gist.github.com/nicolopignatelli/ec8c6fc6882951da8770 ps: searching for documentation/libraries about events in the javascript world is a real PITA because this keyword is always associated with DOM events, which is not what I was looking for.


Viewing all articles
Browse latest Browse all 10

Trending Articles