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 idea
const actualPropsToUpdateFor = propsToUpdateFor.concat(userAddedProps);
What do you think?
Interesting... I implemented it with a whitelist of props to allow rerender, and it needs to be a blacklist.
Good catch.
This was fixed in v6.0.0-alpha.8
, but I forgot to mention it. Sorry.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.