I have an issue when learning VueJS. I want to send data to Firebase, but it keeps telling me that the variables never used. I declare it inside a promise.
This is the script:
methods: {
register: function() {
const info = {
email: this.email,
password: this.passOne,
displayName: this.displayName
};
if(!this.error) {
Firebase.auth()
.createUserWithEmailAndPassword(info.email, info.password)
.then(
userCredentials => {
this.$router.replace('meetings');
},
error => {
this.error = error.message;
}
);
}
}
},
This is the error:
error 'userCredentials' is defined but never used no-unused-vars