javascript - com.facebook.react.bridge.readablenativemap 无法在 React Native 中转换为 java.lang.string
问题描述
我正在使用带有 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))
}
}
解决方案
尝试像这样传递参数:
yield call(addUserPassMailChild, email, password);
或者尝试获取这样的参数:
function addUserPassMailChild({email, password}) {
// TODO
}
推荐阅读
- python - “由于语音响应为空,无法将 Dialogflow 响应解析为 AppResponse”与烧瓶助手
- plotly - 线 + 标记在 Dash Scattergeo Plot 中不起作用
- python - Python Tkinter 在变量中定义的循环条目 x 次中运行
- routing - 在 Codeigniter 的子目录中使用控制器
- android - 如何动态更改屏幕上的recyclerview位置?
- c - 地址值与定义的结构长度没有精确的差异。[C]
- flutter - 将'from'参数传递给动画控制器时闪烁动画?
- c++ - 如何在 C++ 中比较两个类型名是否相等?
- sql - 选择直到特定值的行
- gtk - GTK:当用户编辑某些文本字段时忽略/抑制键事件