-1
Uncaught TypeError: Cannot read property 'login' of undefined.................遗漏的类型错误:无法读取的不确定
import Login from '../components/Login.jsx';
import { useDeps, composeWithTracker, composeAll } from 'mantra-core';
export const composer = ({context, clearErrors}, onData) => {
const { LocalState } = context();
const error = LocalState.get('LOGIN_ERROR');
onData(null, { error });
// clearErrors when unmounting the component
return clearErrors;
};
export const depsMapper = (context, actions) => ({
loginUser: actions.users.login,
clearErrors: actions.users.clearErrors,
context:() => context
});
export default composeAll(composeWithTracker(composer), useDeps(depsMapper))(Login);
C#,PHP,Android和JS ...?你是否为这个问题选择了随机标签?寻求调试帮助的问题(“为什么不是这个代码工作?”)必须包括所需的行为,特定的问题或错误以及在问题本身**中重现**的最短代码。没有**明确问题陈述**的问题对其他读者没有用处。请参阅:[如何创建最小,完整和可验证示例](https://stackoverflow.com/help/mcve)。 –
无论'行动'是没有属性称为'用户'(这行'actions.users.login') - 其余的只有你和你的天知道 –