CodeZettaInterview Hub

TypeScript · Classes · Tech Lead · Scenario

Typing this in class methods/callbacks?

Short Interview Answer

Arrow properties capture this; bind; or specify this parameters.

Detailed Explanation

Passing raw methods as callbacks loses this — classic bug.

Did you know this answer?