It works for all but this didn't, I had all for this following code:
constructor(props) {
super(props);
this.state = {
addchange: ''
}
this.handleInputAddChange = this.handleInputAddChange.bind(this);
}
handleInputAddChange = (e) => {
e.preventDefault();
this.setState({
[e.target.name]: e.target.value
})
}
<input type="text" name="addchange" onChange={this.handleInputAddChange} />
and pops ups the weird error, and for the last time I doubled check that most of my code like this works but this appeared React.js's error screen like this:
TypeError: Cannot read properties of undefined (reading 'handleInputAddChange')
Note that its the same format from my other code like this. and its weird why it didn't work in this one anymore.