Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
shouldComponentUpdate(nextProps, nextState) {
if ((nextProps.reviewMode && !nextProps.editModeOnReviewPage)
&& nextProps.reviewMode === this.props.reviewMode
&& deepEquals(this.state, nextState)
&& nextProps.schema === this.props.schema
&& typeof nextProps.title !== 'function'
&& nextProps.uiSchema === this.props.uiSchema) {
return !Object.keys(nextProps.schema.properties).every(objProp => {
return this.props.data[objProp] === nextProps.data[objProp];
});
}
return true;
}
export const pureWithDeepEquals = shouldUpdate((props, nextProps) => {
return !deepEquals(props, nextProps);
});
shouldComponentUpdate = (nextProps) => {
return !deepEquals(this.props, nextProps);
}
(props, nextProps) => !deepEquals(props, nextProps),
);
shouldComponentUpdate(nextProps, nextState) {
return !deepEquals(this.props, nextProps) || nextState !== this.state;
}
shouldComponentUpdate(nextProps, nextState) {
return !deepEquals(this.props, nextProps) || nextState !== this.state;
}
shouldComponentUpdate = (nextProps, nextState) => {
return !deepEquals(this.props, nextProps) || nextState !== this.state;
}
shouldComponentUpdate(nextProps, nextState) {
return !deepEquals(this.props, nextProps) || nextState !== this.state;
}
shouldComponentUpdate(nextProps) {
return !deepEquals(this.props, nextProps);
}
shouldComponentUpdate(nextProps, nextState) {
if (
nextProps.reviewMode &&
!nextProps.editModeOnReviewPage &&
nextProps.reviewMode === this.props.reviewMode &&
deepEquals(this.state, nextState) &&
nextProps.schema === this.props.schema &&
typeof nextProps.title !== 'function' &&
nextProps.uiSchema === this.props.uiSchema
) {
return !Object.keys(nextProps.schema.properties).every(
objProp => this.props.data[objProp] === nextProps.data[objProp],
);
}
return true;
}