-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') - 其餘的只有你和你的天知道 –