You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The component my form is in needs to call some async data before it loads the form. Normally I just check props.fetching and render null if it's still fetching, but the shouldComponentUpdate of the connected component blocks this prop from re-rendering. I have separated it into two components now so that the fetching happens outside of the reduxForm connected components, but I'm wondering if shouldComponentUpdate shouldn't check for the form props or any additional props that may have been passed to it.
Something like:
{...propsToUpdateFor, ...otherFormProps, ...userAddedProps}=nextProps;// dont think spread work there but just so you get the ideaconstactualPropsToUpdateFor=propsToUpdateFor.concat(userAddedProps);
What do you think?
The text was updated successfully, but these errors were encountered:
The component my form is in needs to call some async data before it loads the form. Normally I just check
props.fetching
and rendernull
if it's still fetching, but theshouldComponentUpdate
of the connected component blocks this prop from re-rendering. I have separated it into two components now so that thefetching
happens outside of thereduxForm
connected components, but I'm wondering ifshouldComponentUpdate
shouldn't check for the form props or any additional props that may have been passed to it.Something like:
What do you think?
The text was updated successfully, but these errors were encountered: