Answer the question
In order to leave comments, you need to log in
Infinite initialization in ReduxForm?
There is a dynamic form, you need to add the ability to edit it.
Added mapStateToProps. And now I have a 10 minute initialization. And the same goes for every click.
Already all fields in the component that creates the form are hung
shouldComponentUpdate(nextProps) {
return shallowCompare(this, nextProps);
}
Answer the question
In order to leave comments, you need to log in
Solved the issue by calling initialization in componentWillMount
this.props.initializeForm({
endDate: this.props.data.endDate,
startDate: this.props.data.endDate,
eventSubType: this.props.data.eventSubType,
eventType : this.props.data.eventType,
summary: this.props.data.summary,
uuid: this.props.data.uuid,
headline: this.props.data.headline,
noteType: this.props.data.noteType,
sourceUrl: this.props.data.sourceUrl
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question