client/src/components/UpdateButton/index.js
// creates the userObjectLead variable to take in the stateful values defined above. The api call takes in the id of the row and this userObjectLead variable and updates the mySQL database. 
creates the userObjectLead variable to take in the stateful values defined above. The api call takes in the id of the row and this userObjectLead variable and updates the mySQL database.
creates the userObjectLead variable to take in the stateful values defined above . The api call takes in the id of the row and this userObjectLead variable and updates the mySQL database .
updateLead(e) {
  e.preventDefault()
  var userObjectLead = {
    firstName: this.state.firstName,
    lastName: this.state.lastName,
    phone: this.state.phone,
    email: this.state.email
  };
  API.updateLead(this.props.id, userObjectLead).then(res => {
    console.log(res.data)
  })
    .catch(err => console.log(err));
}
updateLead ( e ) { e . preventDefault ( ) var userObjectLead = { firstName : this . state . firstName , lastName : this . state . lastName , phone : this . state . phone , email : this . state . email } ; API . updateLead ( this . props . id , userObjectLead ) . then ( res => { console . log ( res . data ) } ) . catch ( err => console . log ( err ) ) ; }
creates the userObjectLead variable to take in the stateful values defined above.
creates the userObjectLead variable to take in the stateful values defined above .