I read \"Why and how to bind methods in your React component classes?\" and grabbed the basic idea of how different is this
by the scopes it gets called.
I
const going = some.print;
going(); // 'this' is undefined.
Here, in the first line, you're storing a reference to the print
function (property) of the some
object in the variable going
.
Note, you're just storing the reference to that particular property (print
), not along with the owner (some
).
this
refers to the 'owner' always.
So when you execute going
, the owner (this
) is unknown (or call it undefined
).