We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
shouldUpdateComponent
1 parent f347d47 commit 10483c3Copy full SHA for 10483c3
packages/enzyme-adapter-react-16/src/ReactSixteenAdapter.js
@@ -840,6 +840,18 @@ class ReactSixteenAdapter extends EnzymeAdapter {
840
return isElement(element);
841
}
842
843
+ shouldUpdateComponent(prevProps, root) {
844
+ const instance = root.instance();
845
+ if (instance !== null) {
846
+ const { updater, props } = instance;
847
+ return (
848
+ updater._renderer._newState !== null || !shallowEqual(prevProps, props)
849
+ );
850
+ }
851
+
852
+ return true;
853
854
855
isValidElementType(object) {
856
return !!object && isValidElementType(object);
857
0 commit comments