client/src/pages/Login/index.js
// Listen for click for user signup. Next create a userObjectSignup that contains the username, password, and email states from this page. Next send this userObjectSignup to the route setup by the backend to interact with the database. Lastly, reset the state of the input boxes to empty.
Listen for click for user signup. Next create a userObjectSignup that contains the username, password, and email states from this page. Next send this userObjectSignup to the route setup by the backend to interact with the database. Lastly, reset the state of the input boxes to empty.
Listen for click for user signup . Next create a userObjectSignup that contains the username password and email states from this page . Next send this userObjectSignup to the route setup by the backend to interact with the database . Lastly reset the state of the input boxes to empty .
userSignup(e) {
    e.preventDefault()
    var userObjectSignup = {
      username: this.state.username,
      password: this.state.passwordSignup,
      email: this.state.emailSignup
    };
    API.signUp(userObjectSignup).then(res => {
      console.log(res.data)
    })
      .catch(err => console.log(err));
    this.setState({ username: "", passwordSignup: "", emailSignup: "" })
  }
userSignup ( e ) { e . preventDefault ( ) var userObjectSignup = { username : this . state . username , password : this . state . passwordSignup , email : this . state . emailSignup } ; API . signUp ( userObjectSignup ) . then ( res => { console . log ( res . data ) } ) . catch ( err => console . log ( err ) ) ; this . setState ( { username : "" , passwordSignup : "" , emailSignup : "" } ) }
Listen for click for user signup.
Listen for click for user signup .