My question is how to pass if my form is true with an if this is my code
firebase.auth().onAuthStateChanged((user) => {
if (user != null) {
console.log(user)
}
})
}
signUpUser = (email, password) => {
try {
if (this.state.password.length < 6) {
alert("Please enter atleast 6 characters")
return;
}
firebase.auth().createUserWithEmailAndPassword(email, password)
}
catch (error) {
console.log(error.toString())
}
}
loginUser = (email, password) => {
try {
firebase.auth().signInWithEmailAndPassword(email, password).then(function (user) {
console.log(user)
})
}
catch (error) {
console.log(error.toString())
}
}
}
}