Question: So have an input field:

```
<input
  id={itemId}
  onChange={handleChange}
  type="number"
  value={packed}
/>

```

And here is my onChange function:

```
  handleChange(e) {
    const { items, onUpdateQuantity } = this.props;
    const updateItem = items.filter((item) =>
      item.itemId === e.target.id,
    );

    const itemQuantity = toNumber(e.target.value);
    updateItem.total += itemQuantity;
    onUpdateQuantity(e.target.id, itemQuantity);
  }

```

So why is React still complaining about an onChange handler not being defined when it already is? I don't want to add a `defaultValue` prop, as that causes bugs in my app. Any ideas?

Answer: 
That is coming because your `value` is not changing anywhere. As you can see from [docs for controlled components](https://reactjs.org/docs/forms.html#controlled-components), the value of the `input` is `this.state.value` and the `onChange` method changes the value inside the `input` by changing `this.state.value`.

As far as I can see, when you input a value inside the `input` (`<input/>`) element, the value of that element is not changing. It is always whatever the value of `packed` is. That is why you're getting the error.
Make sure you bind you function in the constructor

```
class bla extends Component {
    constructor(props){
     super(props);
     this.handleChange = this.handleChange.bind(this);
    }
  }

```

or if using stage 0 to have you have your function in this way.

```
handleChange = () => {}

```

and if not

```
 handleChange () {
     return (e) => {};
    }

```

Also, if your using a class component you should call your **handleChange** with **this.handleChange** if your passing it to functional component then what you have should be fine