我按照http://redux-form.com/6.2.0/docs/GettingStarted.md/
上的文档进行操作" Redux的形式/ SET_SUBMIT_SUCCEEDED"成功触发,可以在新状态下看到更新的值。但是onSubmit返回一个空对象。
父组件
handleChange(values) {
console.log(values);
}
render() {
return (
<div className="container">
<OffCampusForm onSubmit={this.handleChange} />
</div>
)
}
表单组件
render() {
const { handleSubmit } = this.props
return (
<div className="container">
<form onSubmit={handleSubmit}>
<div>
<label htmlFor="firstName">First Name</label>
<Field name="firstName" component="input" type="text" />
</div>
<button type="submit">Submit</button>
</form>
</div>
)
}
减速
const rootReducer = combineReducers({
auth,
routing: routerReducer,
profile,
form: formReducer
})
我做错了什么?