react-native-clean-form icon indicating copy to clipboard operation
react-native-clean-form copied to clipboard

InitialValues with redux-form

Open ticketapp opened this issue 6 years ago • 0 comments

I'm trying to add an initial value as I'm doing it with a standard redux-form, but nothing happens. It is not documented, how can I achieve this? Here is the snippet of code:

function mapStateToProps(state) {
  const firstName = state.auth.firstName;
  const initialValues = {
    firstName
  };
  return {
    initialValues
  };
}

export default connect(mapStateToProps)(
  reduxForm({ form: "Form" })(Form)
);

ticketapp avatar Aug 22 '19 16:08 ticketapp