Explanation to why this is not a duplicate: My code is already working, I have included as a comment. The question is why the this context change when I include
this
Bind it in the constructor
constructor(props) { super(props); this.inputDigit = this.inputDigit.bind(this); }