Thanks Clay for the refresher. In the example for event listening you have console.lo rather then console.log. I like the pub/sub example and could be packaged into a tiny library.
Do you use this as cross components communication? Example trigger a function in a sibling component?
Sure. That's a solid use case.
Thanks for your reply Clay.
I try to keep it top-down but I’ve faced a couple of situations where this pub/sub using the native event bubbling would come in real handy. Didn’t reach for it yet though.
This is awesome, I had no idea. Thanks!
Wow, amazing! Never heard of this thing,plz don't tease me, I'm just a little newb 😂 thanks so much for sharing this 🤗
Really cool! I don't know why I haven't seen this before!
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.