My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

Using addEventListener / onClick inside a React Component

Arjun S Kumar's photo
Arjun S Kumar
·Oct 7, 2016

Hey,

I'm just trying to understand the differences between Vanilla JS addEventListener and the onClick method provided by React for use in a React component.

I'd like to know more in detail about how the event is registered and how it is bubbled and performance in both cases.