I don't like a ton of logic in my classes. Sometimes, I want to pull out something and make a new type (like what used to be standard coding). If I have some utils/Dev.js like
function Dev(x) {
this.x = x
}
Dev.prototype.inc = function() {
this.x = this.x+1
}
If I were to instantiate a React Component with this in the constructor
this.state.dev = new Dev(42)
this.state.dev is not gonna have any access to this, so it can't inc. Did I miss something or are constructed instances useless here?