Skip to content

Commit

Permalink
v4.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
vzaidman committed May 12, 2020
1 parent c9f858f commit 449a3c3
Show file tree
Hide file tree
Showing 19 changed files with 73 additions and 43 deletions.
11 changes: 8 additions & 3 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.2.0
* @welldone-software/why-did-you-render 4.2.1
* MIT Licensed
* Generated by Vitali Zaidman <vzaidman@gmail.com> (https://github.com/vzaidman)
* Generated at 2020-05-06
* Generated at 2020-05-12
*/

'use strict';
Expand Down Expand Up @@ -684,7 +684,12 @@ function accumulateDeepEqualDiffs(a, b, diffsAccumulator) {
}

if (isReactElement(a) && isReactElement(b)) {
return trackDiff(a, b, diffsAccumulator, pathString, diffTypes.reactElement);
if (a.type !== b.type) {
return trackDiff(a, b, diffsAccumulator, pathString, diffTypes.different);
}

var reactElementPropsAreDeepEqual = accumulateDeepEqualDiffs(a.props, b.props, [], "".concat(pathString, ".props"));
return reactElementPropsAreDeepEqual ? trackDiff(a, b, diffsAccumulator, pathString, diffTypes.reactElement) : trackDiff(a, b, diffsAccumulator, pathString, diffTypes.different);
}

if (_isFunction(a) && _isFunction(b)) {
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.

11 changes: 8 additions & 3 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.2.0
* @welldone-software/why-did-you-render 4.2.1
* MIT Licensed
* Generated by Vitali Zaidman <vzaidman@gmail.com> (https://github.com/vzaidman)
* Generated at 2020-05-06
* Generated at 2020-05-12
*/

import _get$1 from 'lodash/get';
Expand Down Expand Up @@ -680,7 +680,12 @@ function accumulateDeepEqualDiffs(a, b, diffsAccumulator) {
}

if (isReactElement(a) && isReactElement(b)) {
return trackDiff(a, b, diffsAccumulator, pathString, diffTypes.reactElement);
if (a.type !== b.type) {
return trackDiff(a, b, diffsAccumulator, pathString, diffTypes.different);
}

var reactElementPropsAreDeepEqual = accumulateDeepEqualDiffs(a.props, b.props, [], "".concat(pathString, ".props"));
return reactElementPropsAreDeepEqual ? trackDiff(a, b, diffsAccumulator, pathString, diffTypes.reactElement) : trackDiff(a, b, diffsAccumulator, pathString, diffTypes.different);
}

if (_isFunction(a) && _isFunction(b)) {
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.

11 changes: 8 additions & 3 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.2.0
* @welldone-software/why-did-you-render 4.2.1
* MIT Licensed
* Generated by Vitali Zaidman <vzaidman@gmail.com> (https://github.com/vzaidman)
* Generated at 2020-05-06
* Generated at 2020-05-12
*/

'use strict';
Expand Down Expand Up @@ -555,7 +555,12 @@ function accumulateDeepEqualDiffs(a, b, diffsAccumulator) {
}

if (isReactElement(a) && isReactElement(b)) {
return trackDiff(a, b, diffsAccumulator, pathString, diffTypes.reactElement);
if (a.type !== b.type) {
return trackDiff(a, b, diffsAccumulator, pathString, diffTypes.different);
}

var reactElementPropsAreDeepEqual = accumulateDeepEqualDiffs(a.props, b.props, [], "".concat(pathString, ".props"));
return reactElementPropsAreDeepEqual ? trackDiff(a, b, diffsAccumulator, pathString, diffTypes.reactElement) : trackDiff(a, b, diffsAccumulator, pathString, diffTypes.different);
}

if (_isFunction(a) && _isFunction(b)) {
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.

11 changes: 8 additions & 3 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.2.0
* @welldone-software/why-did-you-render 4.2.1
* MIT Licensed
* Generated by Vitali Zaidman <vzaidman@gmail.com> (https://github.com/vzaidman)
* Generated at 2020-05-06
* Generated at 2020-05-12
*/

import _get from 'lodash/get';
Expand Down Expand Up @@ -551,7 +551,12 @@ function accumulateDeepEqualDiffs(a, b, diffsAccumulator) {
}

if (isReactElement(a) && isReactElement(b)) {
return trackDiff(a, b, diffsAccumulator, pathString, diffTypes.reactElement);
if (a.type !== b.type) {
return trackDiff(a, b, diffsAccumulator, pathString, diffTypes.different);
}

var reactElementPropsAreDeepEqual = accumulateDeepEqualDiffs(a.props, b.props, [], "".concat(pathString, ".props"));
return reactElementPropsAreDeepEqual ? trackDiff(a, b, diffsAccumulator, pathString, diffTypes.reactElement) : trackDiff(a, b, diffsAccumulator, pathString, diffTypes.different);
}

if (_isFunction(a) && _isFunction(b)) {
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.

11 changes: 8 additions & 3 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.2.0
* @welldone-software/why-did-you-render 4.2.1
* MIT Licensed
* Generated by Vitali Zaidman <vzaidman@gmail.com> (https://github.com/vzaidman)
* Generated at 2020-05-06
* Generated at 2020-05-12
*/

(function (global, factory) {
Expand Down Expand Up @@ -3867,7 +3867,12 @@
}

if (isReactElement(a) && isReactElement(b)) {
return trackDiff(a, b, diffsAccumulator, pathString, diffTypes.reactElement);
if (a.type !== b.type) {
return trackDiff(a, b, diffsAccumulator, pathString, diffTypes.different);
}

var reactElementPropsAreDeepEqual = accumulateDeepEqualDiffs(a.props, b.props, [], "".concat(pathString, ".props"));
return reactElementPropsAreDeepEqual ? trackDiff(a, b, diffsAccumulator, pathString, diffTypes.reactElement) : trackDiff(a, b, diffsAccumulator, pathString, diffTypes.different);
}

if (isFunction_1(a) && isFunction_1(b)) {
Expand Down
6 changes: 3 additions & 3 deletions dist/no-classes-transpile/umd/whyDidYouRender.min.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions dist/umd/whyDidYouRender.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* @welldone-software/why-did-you-render 4.2.0
* @welldone-software/why-did-you-render 4.2.1
* MIT Licensed
* Generated by Vitali Zaidman <vzaidman@gmail.com> (https://github.com/vzaidman)
* Generated at 2020-05-06
* Generated at 2020-05-12
*/

(function (global, factory) {
Expand Down Expand Up @@ -3996,7 +3996,12 @@
}

if (isReactElement(a) && isReactElement(b)) {
return trackDiff(a, b, diffsAccumulator, pathString, diffTypes.reactElement);
if (a.type !== b.type) {
return trackDiff(a, b, diffsAccumulator, pathString, diffTypes.different);
}

var reactElementPropsAreDeepEqual = accumulateDeepEqualDiffs(a.props, b.props, [], "".concat(pathString, ".props"));
return reactElementPropsAreDeepEqual ? trackDiff(a, b, diffsAccumulator, pathString, diffTypes.reactElement) : trackDiff(a, b, diffsAccumulator, pathString, diffTypes.different);
}

if (isFunction_1(a) && isFunction_1(b)) {
Expand Down
6 changes: 3 additions & 3 deletions dist/umd/whyDidYouRender.min.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@welldone-software/why-did-you-render",
"version": "4.2.0",
"version": "4.2.1",
"description": "Monkey patches React to notify you about avoidable re-renders.",
"types": "types.d.ts",
"main": "dist/cjs/whyDidYouRender.min.js",
Expand Down

0 comments on commit 449a3c3

Please sign in to comment.