AllenYuan

register - 3

Apr 26th, 2020
574
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ...
  2. class Register extends Component {
  3.   constructor() {
  4.     super();
  5.     this.changeEmail = event => this.props.onChangeEmail(event.target.value);
  6.     this.changePassword = event => this.props.onChangePassword(event.target.value);
  7.     this.changeUsername = event => this.props.onChangeUsername(event.target.value);
  8.     this.submitForm = (username, email, password) => event => {
  9.       event.preventDefault();
  10.       this.props.onSubmit(username, email, password);
  11.     }
  12.   }
  13.  
  14. // ...
Advertisement
Add Comment
Please, Sign In to add comment