import React, { Component } from \"react\";
import FormUpdate from \"../components/formUpdate\";
import { fetchClothingItem, updateClothingItem } from \"../actions/c
You forgot to bind your handleSubmit function to the class. You can either use arrow function to define the function.
handleSubmit=(data) =>{
...
}
Or you can bind the function in your constructor.
constructor(props) {
super(props);
this.state = {
updateClothingItem: {}
};
this.handleSubmit= this.handleSubmit.bind(this,data);
}