I followed this redux-form docs tip where it indicates that it is beneficial to make a basic form consisting of many components using "FormSection".
Having done this, I have a client form with the Address component built in as follows:
<FormSection name="Address">
<Address />
</FormSection>
He works.
However, when I want to set the initial values of the main form from the state according to this example in redux docs forms the main form is filled, but the Address component in FormSection does not work.
I used this code at the bottom of the client component to connect to the state:
let ClientForm2 = connect(
(state, ownProps) => ({
initialValues: state.editClient,
enableReinitialize: true
}),
{ reducer }
)(ClientForm);
How do you populate FormSections with initial values from the state that comes from the main form?
, intial...