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
When a component is decorated with formValues using a function argument, connected values are not updated when props of the component change.
For example:
formValues({ person }=>({name: `${person}.name`,}))(Component)
When person changes, the component is still connected with the name of the person it has when mounted.
What is the expected behavior?
I am expecting formValues to react to props change.
Other information
The cause of the problem is straightforward when reading the sources:
valuesMap is only computed in constructor and is not computed again when props change.
this.Component is not updated either and the render method uses the initially computed this.Component.
I can PR a patch if you feel this is worth to fix.
The text was updated successfully, but these errors were encountered:
What is the current behavior?
When a component is decorated with
formValues
using a function argument, connected values are not updated when props of the component change.For example:
When
person
changes, the component is still connected with the name of the person it has when mounted.What is the expected behavior?
I am expecting formValues to react to props change.
Other information
The cause of the problem is straightforward when reading the sources:
valuesMap
is only computed inconstructor
and is not computed again when props change.this.Component
is not updated either and therender
method uses the initially computedthis.Component
.I can PR a patch if you feel this is worth to fix.
The text was updated successfully, but these errors were encountered: