我在 Redux-saga 中使用 React Native。當我嘗試將 value saga true 傳遞給我的后端時……我收到了這樣的錯誤訊息。而且我已經在 StackOverflow 中嘗試了相同的問題答案,但是這個答案對我不起作用。我是學生,所以我不知道更多。如果有人能幫我解決這個問題,我真的很感謝你們。??
function addUserPassMailChild(email, password) {
auth()
.createUserWithEmailAndPassword(email, password)
.then(() => {
console.log('User account created & signed in!');
})
.catch(error => {
if (error.code === 'auth/email-already-in-use') {
console.log('That email address is already in use!');
}
if (error.code === 'auth/invalid-email') {
console.log('That email address is invalid!');
}
console.error(error);
});
}
export function* addUserPassMail(action) {
const email = action.payload.email;
const password =action.payload.password;
console.log(email, password)
try {
const emailLogin = yield call(addUserPassMailChild, {email:email, password:password})
if (emailLogin) {
// console.log(loginData.additionalUserInfo.profile)
yield put(AddUserSuccess(emailLogin))
yield put({
type: GET_USER_TOKEN_LISTENER,
})
}
} catch (error) {
console.log(error)
yield put(AddUserField(error))
}
}

uj5u.com熱心網友回復:
嘗試傳遞這樣的引數:
yield call(addUserPassMailChild, email, password);
或者嘗試獲取這樣的引數:
function addUserPassMailChild({email, password}) {
// TODO
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/359564.html
標籤:javascript 反应 反应原生 反应还原 反应钩子
