【发布时间】:2018-02-04 03:38:25
【问题描述】:
我正在使用react native 和redux,这是我的操作:
import EMPLOYEE_UPDATE from './types';
export const employeeUpdate = ({ prop, value }) => {
return (
{
type: EMPLOYEE_UPDATE,
paylaod: { prop, value }
}
);
};
但我得到这个错误:
Actions may not have an undefined "type" property. Have you misspelled a constant?
编辑: types.js 文件是:
export const LOGIN_USER_FAILED = 'loing_user_failed';
export const SHOW_SPINNER = 'show_spinner';
export const EMPLOYEE_UPDATE = 'employee_update';
【问题讨论】:
-
你能用
types文件编辑你的问题吗?
标签: reactjs react-native react-redux