Im looking for a way to import my actions in the export of the reduxForm. To make it more clear, I have:
export default reduxForm({
form: 'synchronousValidation',
fields,
validate
})(SynchronousValidationForm)
and my goal is to include the actions, like we do with connect
, like so:
export default connect(mapStateToProps, actions)(Statistics);
Simply use connect
!
import {compose} from "redux"
import {connect} from "react-redux"
import {reduxForm} from "redux-form"
// ...
export default compose(
connect(mapStateToProps, actions),
reduxForm({
form: 'synchronousValidation',
fields,
validate
})
)(SynchronousValidationForm)
Thank you, works like a charm :)
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Simply use
connect
!