class Register extends Component {
// State holds validity
state = {
csrf_token: '',
username: false,
fullname: false,
email: false,
phone: false,
password: false,
repeatPassword: false,
passwordInput: '',
repeatPasswordInput: '',
usernameInput: '',
fullnameInput: '',
emailInput: '',
phoneInput: ''
};
//HOF returns a state change watch function, setting the corresponding state property to true if the for field has no errors