I\'m unable to set a default value of a form w/redux-form. The result I\'m looking for is an editable text field to later to submit to the database. i.e. updating an email a
You can supply initialValues
in reduxForm
's mapStateToProps:
const mapFormToProps = {
form: 'Profile',
fields,
validate
};
const mapStateToProps = (state, ownProps) => ({
initialValues: {
name: ownProps.userInfo.name
}
});
reduxForm(
mapFormToProps,
mapStateToProps
)(Profile)
Then just bind like so: .