Skip to content

Commit

Permalink
v4.1.3-alpha.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vzaidman committed Apr 25, 2020
1 parent 5019cae commit d291d5d
Show file tree
Hide file tree
Showing 19 changed files with 145 additions and 121 deletions.
36 changes: 20 additions & 16 deletions dist/cjs/whyDidYouRender.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* @welldone-software/why-did-you-render 4.1.2
* @welldone-software/why-did-you-render 4.1.3-alpha.0
* MIT Licensed
* Generated by Vitali Zaidman <vzaidman@gmail.com> (https://github.com/vzaidman)
* Generated at 2020-04-23
* Generated at 2020-04-25
*/

'use strict';
Expand Down Expand Up @@ -923,7 +923,7 @@ function patchClassComponent(ClassComponent, displayName, React, options, ownerD

if (!(this._WDYR.isStrictMode && this._WDYR.renderNumber % 2 === 1)) {
if (this._WDYR.prevProps) {
options.notifier(getUpdateInfo({
var updateInfo = getUpdateInfo({
Component: ClassComponent,
displayName: displayName,
prevProps: this._WDYR.prevProps,
Expand All @@ -932,7 +932,8 @@ function patchClassComponent(ClassComponent, displayName, React, options, ownerD
nextState: this.state,
options: options,
ownerDataMap: ownerDataMap
}));
});
options.notifier(updateInfo);
}

this._WDYR.prevProps = this.props;
Expand Down Expand Up @@ -980,9 +981,9 @@ function patchFunctionalOrStrComponent(FunctionalOrStringComponent, isPure, disp
options: options,
ownerDataMap: ownerDataMap
});
var shouldNotify = updateInfo.reason.propsDifferences && !(isPure && updateInfo.reason.propsDifferences.length === 0);
var notifiedByHooks = !updateInfo.reason.propsDifferences || isPure && updateInfo.reason.propsDifferences.length === 0;

if (shouldNotify) {
if (!notifiedByHooks) {
options.notifier(updateInfo);
}
}
Expand Down Expand Up @@ -1062,7 +1063,7 @@ function trackHookChanges(hookName, _ref, hookResult, React, options, ownerDataM
hookName: hookName,
result: nextHook
});
var ComponentHookDispatchedFromInstance = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner.current;
var ComponentHookDispatchedFromInstance = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED && React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner.current;
var prevHookResultRef = React.useRef(initialHookValue);

if (!ComponentHookDispatchedFromInstance) {
Expand Down Expand Up @@ -1152,15 +1153,18 @@ function whyDidYouRender(React, userOptions) {
}; // Intercept assignments to ReactCurrentOwner.current and reset hooksRef

var currentOwner = null;
Object.defineProperty(React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, 'current', {
get: function get() {
return currentOwner;
},
set: function set(value) {
currentOwner = value;
hooksRef.current = [];
}
});

if (React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) {
Object.defineProperty(React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, 'current', {
get: function get() {
return currentOwner;
},
set: function set(value) {
currentOwner = value;
hooksRef.current = [];
}
});
}

React.createElement = function (componentNameOrComponent) {
var isShouldTrack = null;
Expand Down
6 changes: 3 additions & 3 deletions dist/cjs/whyDidYouRender.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/cjs/whyDidYouRender.min.js.map

Large diffs are not rendered by default.

36 changes: 20 additions & 16 deletions dist/esm/whyDidYouRender.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* @welldone-software/why-did-you-render 4.1.2
* @welldone-software/why-did-you-render 4.1.3-alpha.0
* MIT Licensed
* Generated by Vitali Zaidman <vzaidman@gmail.com> (https://github.com/vzaidman)
* Generated at 2020-04-23
* Generated at 2020-04-25
*/

import _get$1 from 'lodash/get';
Expand Down Expand Up @@ -919,7 +919,7 @@ function patchClassComponent(ClassComponent, displayName, React, options, ownerD

if (!(this._WDYR.isStrictMode && this._WDYR.renderNumber % 2 === 1)) {
if (this._WDYR.prevProps) {
options.notifier(getUpdateInfo({
var updateInfo = getUpdateInfo({
Component: ClassComponent,
displayName: displayName,
prevProps: this._WDYR.prevProps,
Expand All @@ -928,7 +928,8 @@ function patchClassComponent(ClassComponent, displayName, React, options, ownerD
nextState: this.state,
options: options,
ownerDataMap: ownerDataMap
}));
});
options.notifier(updateInfo);
}

this._WDYR.prevProps = this.props;
Expand Down Expand Up @@ -976,9 +977,9 @@ function patchFunctionalOrStrComponent(FunctionalOrStringComponent, isPure, disp
options: options,
ownerDataMap: ownerDataMap
});
var shouldNotify = updateInfo.reason.propsDifferences && !(isPure && updateInfo.reason.propsDifferences.length === 0);
var notifiedByHooks = !updateInfo.reason.propsDifferences || isPure && updateInfo.reason.propsDifferences.length === 0;

if (shouldNotify) {
if (!notifiedByHooks) {
options.notifier(updateInfo);
}
}
Expand Down Expand Up @@ -1058,7 +1059,7 @@ function trackHookChanges(hookName, _ref, hookResult, React, options, ownerDataM
hookName: hookName,
result: nextHook
});
var ComponentHookDispatchedFromInstance = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner.current;
var ComponentHookDispatchedFromInstance = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED && React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner.current;
var prevHookResultRef = React.useRef(initialHookValue);

if (!ComponentHookDispatchedFromInstance) {
Expand Down Expand Up @@ -1148,15 +1149,18 @@ function whyDidYouRender(React, userOptions) {
}; // Intercept assignments to ReactCurrentOwner.current and reset hooksRef

var currentOwner = null;
Object.defineProperty(React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, 'current', {
get: function get() {
return currentOwner;
},
set: function set(value) {
currentOwner = value;
hooksRef.current = [];
}
});

if (React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) {
Object.defineProperty(React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, 'current', {
get: function get() {
return currentOwner;
},
set: function set(value) {
currentOwner = value;
hooksRef.current = [];
}
});
}

React.createElement = function (componentNameOrComponent) {
var isShouldTrack = null;
Expand Down
6 changes: 3 additions & 3 deletions dist/esm/whyDidYouRender.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/esm/whyDidYouRender.min.js.map

Large diffs are not rendered by default.

36 changes: 20 additions & 16 deletions dist/no-classes-transpile/cjs/whyDidYouRender.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* @welldone-software/why-did-you-render 4.1.2
* @welldone-software/why-did-you-render 4.1.3-alpha.0
* MIT Licensed
* Generated by Vitali Zaidman <vzaidman@gmail.com> (https://github.com/vzaidman)
* Generated at 2020-04-23
* Generated at 2020-04-25
*/

'use strict';
Expand Down Expand Up @@ -783,7 +783,7 @@ function patchClassComponent(ClassComponent, displayName, React, options, ownerD

if (!(this._WDYR.isStrictMode && this._WDYR.renderNumber % 2 === 1)) {
if (this._WDYR.prevProps) {
options.notifier(getUpdateInfo({
var updateInfo = getUpdateInfo({
Component: ClassComponent,
displayName: displayName,
prevProps: this._WDYR.prevProps,
Expand All @@ -792,7 +792,8 @@ function patchClassComponent(ClassComponent, displayName, React, options, ownerD
nextState: this.state,
options: options,
ownerDataMap: ownerDataMap
}));
});
options.notifier(updateInfo);
}

this._WDYR.prevProps = this.props;
Expand Down Expand Up @@ -838,9 +839,9 @@ function patchFunctionalOrStrComponent(FunctionalOrStringComponent, isPure, disp
options: options,
ownerDataMap: ownerDataMap
});
var shouldNotify = updateInfo.reason.propsDifferences && !(isPure && updateInfo.reason.propsDifferences.length === 0);
var notifiedByHooks = !updateInfo.reason.propsDifferences || isPure && updateInfo.reason.propsDifferences.length === 0;

if (shouldNotify) {
if (!notifiedByHooks) {
options.notifier(updateInfo);
}
}
Expand Down Expand Up @@ -920,7 +921,7 @@ function trackHookChanges(hookName, _ref, hookResult, React, options, ownerDataM
hookName: hookName,
result: nextHook
});
var ComponentHookDispatchedFromInstance = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner.current;
var ComponentHookDispatchedFromInstance = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED && React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner.current;
var prevHookResultRef = React.useRef(initialHookValue);

if (!ComponentHookDispatchedFromInstance) {
Expand Down Expand Up @@ -1010,15 +1011,18 @@ function whyDidYouRender(React, userOptions) {
}; // Intercept assignments to ReactCurrentOwner.current and reset hooksRef

var currentOwner = null;
Object.defineProperty(React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, 'current', {
get: function get() {
return currentOwner;
},
set: function set(value) {
currentOwner = value;
hooksRef.current = [];
}
});

if (React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) {
Object.defineProperty(React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, 'current', {
get: function get() {
return currentOwner;
},
set: function set(value) {
currentOwner = value;
hooksRef.current = [];
}
});
}

React.createElement = function (componentNameOrComponent) {
var isShouldTrack = null;
Expand Down
6 changes: 3 additions & 3 deletions dist/no-classes-transpile/cjs/whyDidYouRender.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/no-classes-transpile/cjs/whyDidYouRender.min.js.map

Large diffs are not rendered by default.

36 changes: 20 additions & 16 deletions dist/no-classes-transpile/esm/whyDidYouRender.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* @welldone-software/why-did-you-render 4.1.2
* @welldone-software/why-did-you-render 4.1.3-alpha.0
* MIT Licensed
* Generated by Vitali Zaidman <vzaidman@gmail.com> (https://github.com/vzaidman)
* Generated at 2020-04-23
* Generated at 2020-04-25
*/

import _get from 'lodash/get';
Expand Down Expand Up @@ -779,7 +779,7 @@ function patchClassComponent(ClassComponent, displayName, React, options, ownerD

if (!(this._WDYR.isStrictMode && this._WDYR.renderNumber % 2 === 1)) {
if (this._WDYR.prevProps) {
options.notifier(getUpdateInfo({
var updateInfo = getUpdateInfo({
Component: ClassComponent,
displayName: displayName,
prevProps: this._WDYR.prevProps,
Expand All @@ -788,7 +788,8 @@ function patchClassComponent(ClassComponent, displayName, React, options, ownerD
nextState: this.state,
options: options,
ownerDataMap: ownerDataMap
}));
});
options.notifier(updateInfo);
}

this._WDYR.prevProps = this.props;
Expand Down Expand Up @@ -834,9 +835,9 @@ function patchFunctionalOrStrComponent(FunctionalOrStringComponent, isPure, disp
options: options,
ownerDataMap: ownerDataMap
});
var shouldNotify = updateInfo.reason.propsDifferences && !(isPure && updateInfo.reason.propsDifferences.length === 0);
var notifiedByHooks = !updateInfo.reason.propsDifferences || isPure && updateInfo.reason.propsDifferences.length === 0;

if (shouldNotify) {
if (!notifiedByHooks) {
options.notifier(updateInfo);
}
}
Expand Down Expand Up @@ -916,7 +917,7 @@ function trackHookChanges(hookName, _ref, hookResult, React, options, ownerDataM
hookName: hookName,
result: nextHook
});
var ComponentHookDispatchedFromInstance = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner.current;
var ComponentHookDispatchedFromInstance = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED && React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner.current;
var prevHookResultRef = React.useRef(initialHookValue);

if (!ComponentHookDispatchedFromInstance) {
Expand Down Expand Up @@ -1006,15 +1007,18 @@ function whyDidYouRender(React, userOptions) {
}; // Intercept assignments to ReactCurrentOwner.current and reset hooksRef

var currentOwner = null;
Object.defineProperty(React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, 'current', {
get: function get() {
return currentOwner;
},
set: function set(value) {
currentOwner = value;
hooksRef.current = [];
}
});

if (React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) {
Object.defineProperty(React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, 'current', {
get: function get() {
return currentOwner;
},
set: function set(value) {
currentOwner = value;
hooksRef.current = [];
}
});
}

React.createElement = function (componentNameOrComponent) {
var isShouldTrack = null;
Expand Down
6 changes: 3 additions & 3 deletions dist/no-classes-transpile/esm/whyDidYouRender.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/no-classes-transpile/esm/whyDidYouRender.min.js.map

Large diffs are not rendered by default.

36 changes: 20 additions & 16 deletions dist/no-classes-transpile/umd/whyDidYouRender.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* @welldone-software/why-did-you-render 4.1.2
* @welldone-software/why-did-you-render 4.1.3-alpha.0
* MIT Licensed
* Generated by Vitali Zaidman <vzaidman@gmail.com> (https://github.com/vzaidman)
* Generated at 2020-04-23
* Generated at 2020-04-25
*/

(function (global, factory) {
Expand Down Expand Up @@ -4438,7 +4438,7 @@

if (!(this._WDYR.isStrictMode && this._WDYR.renderNumber % 2 === 1)) {
if (this._WDYR.prevProps) {
options.notifier(getUpdateInfo({
var updateInfo = getUpdateInfo({
Component: ClassComponent,
displayName: displayName,
prevProps: this._WDYR.prevProps,
Expand All @@ -4447,7 +4447,8 @@
nextState: this.state,
options: options,
ownerDataMap: ownerDataMap
}));
});
options.notifier(updateInfo);
}

this._WDYR.prevProps = this.props;
Expand Down Expand Up @@ -4493,9 +4494,9 @@
options: options,
ownerDataMap: ownerDataMap
});
var shouldNotify = updateInfo.reason.propsDifferences && !(isPure && updateInfo.reason.propsDifferences.length === 0);
var notifiedByHooks = !updateInfo.reason.propsDifferences || isPure && updateInfo.reason.propsDifferences.length === 0;

if (shouldNotify) {
if (!notifiedByHooks) {
options.notifier(updateInfo);
}
}
Expand Down Expand Up @@ -4575,7 +4576,7 @@
hookName: hookName,
result: nextHook
});
var ComponentHookDispatchedFromInstance = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner.current;
var ComponentHookDispatchedFromInstance = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED && React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner.current;
var prevHookResultRef = React.useRef(initialHookValue);

if (!ComponentHookDispatchedFromInstance) {
Expand Down Expand Up @@ -4665,15 +4666,18 @@
}; // Intercept assignments to ReactCurrentOwner.current and reset hooksRef

var currentOwner = null;
Object.defineProperty(React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, 'current', {
get: function get() {
return currentOwner;
},
set: function set(value) {
currentOwner = value;
hooksRef.current = [];
}
});

if (React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) {
Object.defineProperty(React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, 'current', {
get: function get() {
return currentOwner;
},
set: function set(value) {
currentOwner = value;
hooksRef.current = [];
}
});
}

React.createElement = function (componentNameOrComponent) {
var isShouldTrack = null;
Expand Down
Loading

0 comments on commit d291d5d

Please sign in to comment.