DEV Community

Discussion on: this keyword in JavaScript

Collapse
 
chinmaymhatre profile image
Chinmay Mhatre • Edited

Thank you for the feedback! I will update some the things like ideal usage. However, I do not believe " just don't use this" is point of the blog . In high school, we were taught about the atomic model . In that chapter we started with the " John Dalton " model , after teaching us the model the professor told us " You know what we don't use this model anymore " and the professor went on to teach us the rest of the 4 models. Thus , I believe even though there are better ways to do something we do need to know how things work in general.

Of course there won't be any weirdness if you avoid it .😂
My job while writing this blog was to give out as many cases and outcome as I could .
I do believe I should give out cases where it should actually be used.

In ReactJS, again yes there are function components! But what if someone's job or project just uses class components, I don't think being subjective while writing an article is the way to go , saying " you know what you can use function component just use those instead of class components " isn't a way I would like to go about things.😂

I don't think if anyone googled " this keyword in JavaScript " they want to see " just don't use it " 😂.
Hence, "They won't do it" , "this won't happen" is subjectivity that I try to avoid.

Cheers!

Some comments have been hidden by the post's author - find out more