score:4

Accepted answer
constructor(props) {
   super(props);

   this.state = {licensees: []};

}

componentDidMount() {
    LicensingService.getLicensees()
      .then(licensees => {
        this.setState({licensees});
        console.log("component", licensees);
        console.log(licensees[0].city);
    });
}

score:1

{this.state.licensees && <td>{this.state.licensees[0].city}</td>} //only render when you have the value in the state.

Related Query

More Query from same tag