
A side note: we haven’t defined onFirstNameChange as a method. This is extremely important to define it as an arrow function property on the class, and not a method. If we had defined it as a method instead, then this would be bound to the form input that called the method, not to the class as we would have expected. This small detail often trips up beginners. This is another reason to avoid classes in JavaScript.