반응형
에러가 발생한 곳:
const onSubmit = async (event) => { // createUserWithEmailAndPassword는 promise를 return 하기 때문에 async로 비동기화 시킴
event.preventDefault();
try {
createUserWithEmailAndPassword(/*이 부분에서 에러 발생*/ email, password);
} catch(error) {
console.log(error);
}
};
해결 :
const onSubmit = async (event) => { // createUserWithEmailAndPassword는 promise를 return 하기 때문에 async로 비동기화 시킴
event.preventDefault();
try {
createUserWithEmailAndPassword(auth, email, password);
} catch(error) {
console.log(error);
}
};
반응형