DEV Community

Discussion on: 🧐Most Confusing Part Of JavaScript.

Collapse
 
pepkin88 profile image
Marek Pepke

I see this as an implicit zeroth parameter of a function.
You can explicitly assign its value by using the .call or .apply or .bind methods.
Event listeners provide the event object as the first argument and the receiving element as the zeroth argument this.

But I get that it is confusing, by its implicitness and by having many rules associated with it.

However, I don't know why have you suggested React Hooks as a remedy for this. You know that React isn't everything, right? People use JS for other things than React.