score:0

Accepted answer
handleInputChange(event) {
    const target = event.target;
    const value = target.value;
    const name = target.name;

    this.setState({
      addData: {
        [this.state.fullName]:{
            ...this.state.addData[this.state.fullName],
            [name]: value,
        }
      }
    });
}

score:0

handleInputChange(event) {
    const target = event.target;
    const value = target.value;
    const name = target.name;

    this.setState({
      addData: {
        ...this.state.addData,
        [name]: value
      }
    });
}

score:0

handleInputChange(event) {
    const { name, value } = event.target;

    this.setState({
        addData: {
            ...this.state.addData,
            [name]: value
        }
    });
}

score:0

this.setState({
      addData: {
        [...this.state.fullName]:{
            [name]: value
        }
      }
    });

Related Query

More Query from same tag