updateSiteInformationAndRender() {
    // GET API call
    return axios.get("/api/sites").then(data => {
      // Set sites variable
      this.setState({
        sites: data.data,
        currentSiteEquipment: [],
        currentSiteEvents: []
      });
    });
  }
// Function containing API call for populating state variable sites data
Function containing API call for populating state variable sites data
Function containing API call for populating state variable sites data
updateSiteInformationAndRender() {
    return axios.get("/api/sites").then(data => {
      this.setState({
        sites: data.data,
        currentSiteEquipment: [],
        currentSiteEvents: []
      });
    });
  }
updateSiteInformationAndRender ( ) { return axios . get ( "/api/sites" ) . then ( data => { this . setState ( { sites : data . data , currentSiteEquipment : [ ] , currentSiteEvents : [ ] } ) ; } ) ; }
Function containing API call for populating state variable sites data
Function containing API call for populating state variable sites data
// GET API call // Set sites variable