By storing the validation messages an an Object, this library unfortunately does not work with a simple PureRenderMixin version of shouldComponentUpdate (which just does a === check over all the props and state), because even though the props.errors object has changed, the reference equality check does not reflect that.
It would be great if the props.errors could change reference equality when the errors change (using something like ImmutableJs––as Facebook suggests––or even just by using the ES6 spread operator (ex: this.setState({ errors: { ...nextErrors } }) instead of this.setState({ errors: nextErrors })
By storing the validation messages an an
Object
, this library unfortunately does not work with a simplePureRenderMixin
version ofshouldComponentUpdate
(which just does a===
check over all theprops
andstate
), because even though theprops.errors
object has changed, the reference equality check does not reflect that.It would be great if the
props.errors
could change reference equality when the errors change (using something like ImmutableJs––as Facebook suggests––or even just by using the ES6 spread operator (ex:this.setState({ errors: { ...nextErrors } })
instead ofthis.setState({ errors: nextErrors })