How to name this folder and where to store common methods.
handleChange = (e) => {
const { currentTarget: input } = e;
this.setState(prevState => {
let linkData = { ...prevState.linkData };
linkData[input.name] = input.value;
if (input.name === "tag") {
linkData = this.addTag(linkData);
}
return { linkData };
});
};
Aucun commentaire:
Enregistrer un commentaire