При использовании неизменяемой формы реаги-редукса, когда я пытаюсь передать избыточную форму внутри редуктора, создаю ошибку «Вы должны передать компонент в функцию, возвращаемую соединением»
import React from 'react';
import { connect } from 'react-redux';
import { compose } from 'redux';
import { Field, reduxForm } from 'redux-form/immutable';";
import makeSelectUser from "./selectors";
import actionCreators from "./actions";
class EditUser extends React.PureComponent {
}
const mapDispatchToProps = bindActionCreators;
const mapStateToProps = makeSelectUser();
const withConnect = connect(
mapStateToProps,
mapDispatchToProps(actionCreators)
);
export default compose(
withConnect,
reduxForm({
destroyOnUnmount: false,
enableReinitialize: true,
keepDirtyOnReinitialize: true,
form: 'EditUser'
})
)(EditUser);
ошибка получения
browser.js?40b6:38 Uncaught Error: You must pass a component to the function returned by connect. Instead received {"defaultProps":{"touchOnBlur":true,"touchOnChange":false,"persistentSubmitErrors":false,"destroyOnUnmount":false,"enableReinitialize":true,"keepDirtyOnReinitialize":true,"updateUnregisteredFields":false,"pure":true,"forceUnregisterOnUnmount":false,"form":"EditUser"}}