https://codesandbox.io/s/zn812n05v4
const SyncValidationForm = props => {
const { handleSubmit, pristine, reset, submitting } = props;
console.log("handleSubmit--->", handleSubmit);
console.log("handleSubmit props--->", props);
dispatch(showLoading("sectionBar"));
return (
<div>
<LoadingBar />
<form onSubmit={handleSubmit}>
<Field
name="username"
type="text"
component={renderField}
label="Username"
/>
答案 0 :(得分:1)
调度通过props
传递。请改用props.dispatch
答案 1 :(得分:1)