diff --git a/babel.config.cjs b/babel.config.cjs
index c96aff9..7b582cc 100644
--- a/babel.config.cjs
+++ b/babel.config.cjs
@@ -19,8 +19,7 @@ module.exports = function(api) {
const plugins = compact([
(!isProd && !isTest) && 'react-refresh/babel',
- !isProd && '@babel/plugin-transform-class-properties',
]);
- return { presets, plugins };
+ return {presets, plugins};
};
diff --git a/cypress/e2e/big_list.js b/cypress/e2e/big_list.js
index a2af6f5..158022c 100644
--- a/cypress/e2e/big_list.js
+++ b/cypress/e2e/big_list.js
@@ -3,12 +3,12 @@ it('Big list basic example', () => {
cy.contains('button', 'Increase!').click();
expect(console.group).to.be.calledWithMatches([
- { match: 'BigList', times: 1 },
- { match: /props.*style\W/, times: 1 },
+ {match: 'BigList', times: 1},
+ {match: /props.*style\W/, times: 1},
]);
expect(console.log).to.be.calledWithMatches([
- { match: [() => true, 'Re-rendered because of props changes'], times: 1 },
+ {match: [() => true, 'Re-rendered because of props changes'], times: 1},
]);
});
});
diff --git a/cypress/e2e/child-of-pure-component.js b/cypress/e2e/child-of-pure-component.js
index 6c0b610..7737ab3 100644
--- a/cypress/e2e/child-of-pure-component.js
+++ b/cypress/e2e/child-of-pure-component.js
@@ -6,12 +6,12 @@ it('Child of Pure Component', () => {
cy.contains('button', 'clicks:').should('contain', '2');
expect(console.group).to.be.calledWithMatches([
- { match: 'PureFather', times: 2 },
- { match: /props.*children\W/, times: 2 },
+ {match: 'PureFather', times: 2},
+ {match: /props.*children\W/, times: 2},
]);
expect(console.log).to.be.calledWithMatches([
- { match: 'syntax always produces a *NEW* immutable React element', times: 2 },
+ {match: 'syntax always produces a *NEW* immutable React element', times: 2},
]);
});
});
diff --git a/cypress/e2e/clone-element.js b/cypress/e2e/clone-element.js
index 0d47a6a..7ae0274 100644
--- a/cypress/e2e/clone-element.js
+++ b/cypress/e2e/clone-element.js
@@ -1,11 +1,11 @@
it('Creating react element using React.cloneElement', () => {
cy.visitAndSpyConsole('/#cloneElement', console => {
expect(console.group).to.be.calledWithMatches([
- { match: 'TestComponent', times: 1 },
+ {match: 'TestComponent', times: 1},
]);
expect(console.log).to.be.calledWithMatches([
- { match: [() => true, 'Re-rendered because the props object itself changed but its values are all equal.'], times: 1 },
+ {match: [() => true, 'Re-rendered because the props object itself changed but its values are all equal.'], times: 1},
]);
});
});
diff --git a/cypress/e2e/create-factory.js b/cypress/e2e/create-factory.js
index b23f008..c533cf7 100644
--- a/cypress/e2e/create-factory.js
+++ b/cypress/e2e/create-factory.js
@@ -1,11 +1,11 @@
it('Creating react element using React.createFactory', () => {
cy.visitAndSpyConsole('/#createFactory', console => {
expect(console.group).to.be.calledWithMatches([
- { match: 'TestComponent', times: 1 },
+ {match: 'TestComponent', times: 1},
]);
expect(console.log).to.be.calledWithMatches([
- { match: [() => true, 'Re-rendered because the props object itself changed but its values are all equal.'], times: 1 },
+ {match: [() => true, 'Re-rendered because the props object itself changed but its values are all equal.'], times: 1},
]);
});
});
diff --git a/cypress/e2e/hooks-use-context.js b/cypress/e2e/hooks-use-context.js
index 8daf69a..022638d 100644
--- a/cypress/e2e/hooks-use-context.js
+++ b/cypress/e2e/hooks-use-context.js
@@ -1,16 +1,16 @@
it('Hooks - useContext', () => {
cy.visitAndSpyConsole('/#useContext', console => {
expect(console.group).to.be.calledWithMatches([
- { match: /ComponentWithContextHook$/, times: 2 },
- { match: 'Rendered by Main', times: 1 },
- { match: 'ComponentWithContextHookInsideMemoizedParent', times: 1 },
- { match: '[hook useState result]', times: 1 },
- { match: '[hook useContext result]', times: 2 },
+ {match: /ComponentWithContextHook$/, times: 2},
+ {match: 'Rendered by Main', times: 1},
+ {match: 'ComponentWithContextHookInsideMemoizedParent', times: 1},
+ {match: '[hook useState result]', times: 1},
+ {match: '[hook useContext result]', times: 2},
]);
expect(console.log).to.be.calledWithMatches([
- { match: [() => true, 'Re-rendered because the props object itself changed but its values are all equal.'], times: 1 },
- { match: [() => true, 'Re-rendered because of hook changes'], times: 3 },
+ {match: [() => true, 'Re-rendered because the props object itself changed but its values are all equal.'], times: 1},
+ {match: [() => true, 'Re-rendered because of hook changes'], times: 3},
]);
});
});
diff --git a/cypress/e2e/hooks-use-memo-and-callback-child.js b/cypress/e2e/hooks-use-memo-and-callback-child.js
index a72bb00..57b30c4 100644
--- a/cypress/e2e/hooks-use-memo-and-callback-child.js
+++ b/cypress/e2e/hooks-use-memo-and-callback-child.js
@@ -3,10 +3,10 @@ it('Hooks - useMemo and useCallback Child', () => {
cy.contains('button', 'count: 0').click();
expect(console.group).to.be.calledWithMatches([
- { match: 'Comp', times: 2 },
- { match: /useMemoFn/, times: 2 },
- { match: /useCallbackFn/, times: 2 },
- { match: /props.*\..*count/, times: 1 },
+ {match: 'Comp', times: 2},
+ {match: /useMemoFn/, times: 2},
+ {match: /useCallbackFn/, times: 2},
+ {match: /props.*\..*count/, times: 1},
]);
});
});
diff --git a/cypress/e2e/hooks-use-reducer.js b/cypress/e2e/hooks-use-reducer.js
index ed88f86..498a32e 100644
--- a/cypress/e2e/hooks-use-reducer.js
+++ b/cypress/e2e/hooks-use-reducer.js
@@ -1,12 +1,12 @@
it('Hooks - useReducer', () => {
const checkConsole = (console, times) => {
expect(console.group).to.be.calledWithMatches([
- { match: 'Main', times },
- { match: '[hook useReducer result]', times },
+ {match: 'Main', times},
+ {match: '[hook useReducer result]', times},
]);
expect(console.log).to.be.calledWithMatches([
- { match: 'different objects that are equal by value.', times },
+ {match: 'different objects that are equal by value.', times},
]);
};
diff --git a/cypress/e2e/hooks-use-state.js b/cypress/e2e/hooks-use-state.js
index df1101e..8698823 100644
--- a/cypress/e2e/hooks-use-state.js
+++ b/cypress/e2e/hooks-use-state.js
@@ -7,8 +7,8 @@ it('Hooks - useState', () => {
});
expect(console.group).to.be.calledWithMatches([
- { match: 'BrokenHooksPureComponent', times: 2 },
- { match: '[hook useState result]', times: 2 },
+ {match: 'BrokenHooksPureComponent', times: 2},
+ {match: '[hook useState result]', times: 2},
]);
});
});
diff --git a/cypress/e2e/hot-reload.js b/cypress/e2e/hot-reload.js
index ecb336a..7e3febb 100644
--- a/cypress/e2e/hot-reload.js
+++ b/cypress/e2e/hot-reload.js
@@ -1,11 +1,11 @@
it('React Hot Reload Of Tracked Component', () => {
cy.visitAndSpyConsole('/#hotReload', console => {
expect(console.group).to.be.calledWithMatches([
- { match: 'HotExportedDemoComponent', times: 1 },
+ {match: 'HotExportedDemoComponent', times: 1},
]);
expect(console.log).to.be.calledWithMatches([
- { match: [() => true, 'Re-rendered because the props object itself changed but its values are all equal.'], times: 1 },
+ {match: [() => true, 'Re-rendered because the props object itself changed but its values are all equal.'], times: 1},
]);
});
});
diff --git a/cypress/e2e/no-change.js b/cypress/e2e/no-change.js
index c8de7c4..92dc26d 100644
--- a/cypress/e2e/no-change.js
+++ b/cypress/e2e/no-change.js
@@ -1,11 +1,11 @@
it('No Changes', () => {
cy.visitAndSpyConsole('/#noChanges', console => {
expect(console.group).to.be.calledWithMatches([
- { match: 'ClassDemo', times: 1 },
+ {match: 'ClassDemo', times: 1},
]);
expect(console.log).to.be.calledWithMatches([
- { match: [() => true, 'Re-rendered although props and state objects are the same.'], times: 1 },
+ {match: [() => true, 'Re-rendered although props and state objects are the same.'], times: 1},
]);
});
});
diff --git a/cypress/e2e/owner-reasons.js b/cypress/e2e/owner-reasons.js
index f8bccb7..d2f874f 100644
--- a/cypress/e2e/owner-reasons.js
+++ b/cypress/e2e/owner-reasons.js
@@ -1,20 +1,20 @@
it('Log Owner Reasons', () => {
cy.visitAndSpyConsole('/#logOwnerReasons', console => {
expect(console.group).to.be.calledWithMatches([
- { match: 'Child', times: 3 },
- { match: 'Rendered by Owner', times: 1 },
- { match: 'Rendered by ClassOwner', times: 1 },
- { match: 'Rendered by HooksOwner', times: 1 },
- { match: /props.*a\W/, times: 1 },
- { match: '[hook useState result]', times: 2 },
+ {match: 'Child', times: 3},
+ {match: 'Rendered by Owner', times: 1},
+ {match: 'Rendered by ClassOwner', times: 1},
+ {match: 'Rendered by HooksOwner', times: 1},
+ {match: /props.*a\W/, times: 1},
+ {match: '[hook useState result]', times: 2},
]);
expect(console.log).to.be.calledWithMatches([
- { match: [() => true, 'Re-rendered because the props object itself changed but its values are all equal'], times: 3 },
- { match: [() => true, 'Re-rendered because of props changes'], times: 1 },
- { match: [() => true, 'Re-rendered because of state changes'], times: 1 },
- { match: [() => true, 'Re-rendered because of hook changes'], times: 2 },
- { match: 'different objects.', times: 4 },
+ {match: [() => true, 'Re-rendered because the props object itself changed but its values are all equal'], times: 3},
+ {match: [() => true, 'Re-rendered because of props changes'], times: 1},
+ {match: [() => true, 'Re-rendered because of state changes'], times: 1},
+ {match: [() => true, 'Re-rendered because of hook changes'], times: 2},
+ {match: 'different objects.', times: 4},
]);
});
});
diff --git a/cypress/e2e/props-and-state-change.js b/cypress/e2e/props-and-state-change.js
index ddb0c76..1f11bc2 100644
--- a/cypress/e2e/props-and-state-change.js
+++ b/cypress/e2e/props-and-state-change.js
@@ -1,13 +1,13 @@
it('Props And State Changes', () => {
cy.visitAndSpyConsole('/#bothChanges', console => {
expect(console.group).to.be.calledWithMatches([
- { match: 'ClassDemo', times: 1 },
- { match: /props.*a\W/, times: 1 },
- { match: /state.*c\W/, times: 1 },
+ {match: 'ClassDemo', times: 1},
+ {match: /props.*a\W/, times: 1},
+ {match: /state.*c\W/, times: 1},
]);
expect(console.log).to.be.calledWithMatches([
- { match: 'different objects that are equal by value.', times: 2 },
+ {match: 'different objects that are equal by value.', times: 2},
]);
});
});
diff --git a/cypress/e2e/props-changes.js b/cypress/e2e/props-changes.js
index b66bf69..296aa51 100644
--- a/cypress/e2e/props-changes.js
+++ b/cypress/e2e/props-changes.js
@@ -1,10 +1,10 @@
it('props changes', () => {
cy.visitAndSpyConsole('/#propsChanges', console => {
expect(console.group).to.be.calledWithMatches([
- { match: 'ClassDemo', times: 5 },
- { match: 'Rendered by Main', times: 5 },
- { match: /props.*a\W/, times: 4 },
- { match: /props.*containerProps\W/, times: 4 },
+ {match: 'ClassDemo', times: 5},
+ {match: 'Rendered by Main', times: 5},
+ {match: /props.*a\W/, times: 4},
+ {match: /props.*containerProps\W/, times: 4},
]);
});
});
diff --git a/cypress/e2e/react-redux.js b/cypress/e2e/react-redux.js
index fec0f62..54d6618 100644
--- a/cypress/e2e/react-redux.js
+++ b/cypress/e2e/react-redux.js
@@ -2,12 +2,12 @@ describe('react-redux', () => {
it('React Redux', () => {
const checkConsole = (console, times) => {
expect(console.group).to.be.calledWithMatches([
- { match: 'ConnectedSimpleComponent', times },
- { match: '[hook useSelector result]', times },
+ {match: 'ConnectedSimpleComponent', times},
+ {match: '[hook useSelector result]', times},
]);
expect(console.log).to.be.calledWithMatches([
- { match: [() => true, 'Re-rendered because of hook changes'], times },
+ {match: [() => true, 'Re-rendered because of hook changes'], times},
]);
};
@@ -33,13 +33,13 @@ describe('react-redux', () => {
it('React Redux HOC', () => {
const checkConsole = (console, times) => {
expect(console.group).to.be.calledWithMatches([
- { match: 'SimpleComponent', times: times * 2 },
- { match: /props.*a\W/, times },
+ {match: 'SimpleComponent', times: times * 2},
+ {match: /props.*a\W/, times},
]);
expect(console.log).to.be.calledWithMatches([
- { match: [() => true, 'Re-rendered because of props changes'], times },
- { match: 'different objects that are equal by value', times },
+ {match: [() => true, 'Re-rendered because of props changes'], times},
+ {match: 'different objects that are equal by value', times},
]);
};
diff --git a/cypress/e2e/special-changes.js b/cypress/e2e/special-changes.js
index 45390df..16cbe5c 100644
--- a/cypress/e2e/special-changes.js
+++ b/cypress/e2e/special-changes.js
@@ -1,14 +1,14 @@
it('Special Changes', () => {
cy.visitAndSpyConsole('/#specialChanges', console => {
expect(console.group).to.be.calledWithMatches([
- { match: 'ClassDemo', times: 1 },
+ {match: 'ClassDemo', times: 1},
]);
expect(console.log).to.be.calledWithMatches([
- { match: 'different regular expressions with the same value.', times: 1 },
- { match: 'different functions with the same name.', times: 1 },
- { match: 'different date objects with the same value.', times: 1 },
- { match: 'different React elements (remember that the
{'Open the console and notice how the heavy list re-renders on every click on "Increase!" even though it\'s props are the same.'}
{'Will cause a re-render since {num: 0} !== {num: 0}'}
-{'Will NOT cause a re-render setState won\'t be called'}
-