redux-form
Version:
A higher order component decorator for forms using Redux and React
16 lines (13 loc) • 530 B
JavaScript
var defaultShouldWarn = function defaultShouldWarn(_ref) {
var values = _ref.values,
nextProps = _ref.nextProps,
initialRender = _ref.initialRender,
lastFieldValidatorKeys = _ref.lastFieldValidatorKeys,
fieldValidatorKeys = _ref.fieldValidatorKeys,
structure = _ref.structure;
if (initialRender) {
return true;
}
return !structure.deepEqual(values, nextProps && nextProps.values) || !structure.deepEqual(lastFieldValidatorKeys, fieldValidatorKeys);
};
export default defaultShouldWarn;