0
我得到这个异常:阵营 - 终极版表格无法在店里找到“用户”的形式
Uncaught Error: Unable to create Form component. Could not find form for "user" in the store.
这里是我的reducers.js
function initialUserState(state = {email: '', password: ''}) {
return state;
}
const crmApp = combineReducers({
auth,
user: initialUserState
});
export default crmApp;
而且这里的index.js
let store = createStore(reducers);
console.log(store.getState());
ReactDOM.render(
<Provider store={ store }>
<App />
</Provider>,
document.getElementById('root')
);
存储控制台输出显示包含“用户”对象: 对象{AUTH:对象,用户:对象}
auth:
Object
isAuthenticated:false
isFetching: false
Object
user:
Object
email:""
password:""
用户基本上是登录表单模型。
有人有想法如何解决这个问题吗?可能我在redux商店中将用户模型错误了?
在此先感谢。:)
我是按照这个指南[链接](http://davidkpiano.github.io/react-redux-form/models.html)的形式。但是下面的形式减速器和形式装饰没有任何关系。 '//装饰形式部件 的ContactForm = reduxForm({ 形式: '接触' //这种形式 一个唯一的名称})(的ContactForm);' – comprex
即链路404 – spirift
我得到它的工作:) 代码下面combineReducers: '常量crmApp = combineReducers({ AUTH, 深:combineForms({ 用户:initialUserState }, '深') });' 我被忘combineForms帮手。 – comprex